Flashcards

Quick study sessions to strengthen memory and retain key concepts.

Flashcard Study

Java: Code Reading and Debugging

Front

How can variable scope affect your program?

Scope determines where a variable can be accessed. Variables declared inside a method are local to that method…

View Card →
Flashcard Study

Java: Code Reading and Debugging

Front

How do compile-time errors differ from logic errors?

Compile-time errors prevent code compilation; logic errors occur during execution. Compile-time errors are syntax errors detected by the…

View Card →
Flashcard Study

Java: Code Reading and Debugging

Front

Why is data type important in Java?

Data types define what kind of data a variable can hold. Choosing the correct data type helps avoid…

View Card →
Flashcard Study

Java: Code Reading and Debugging

Front

How would you explain a variable in a Java interview?

A storage location in memory with a name and a type. In Java, a variable is a way…

View Card →
Flashcard Study

Java: Code Reading and Debugging

Front

Why trace a checkout example by hand before trusting the output?

It gives you expected checkpoints so debugging becomes comparison instead of guessing. Tracing one small example helps you…

View Card →
Flashcard Study

Java: BigDecimal and Money

Front

Code-Reading Insights: BigDecimal Arithmetic?

Understand setScale and roundingmode for accurate results. When reading code with BigDecimal, look for setScale and rounding mode…

View Card →
Flashcard Study

Java: BigDecimal and Money

Front

Trade-offs of Using BigDecimal for Performance?

BigDecimal is precise but can be slower and memory-intensive. BigDecimal offers precision but may have performance costs compared…

View Card →
Flashcard Study

Java: BigDecimal and Money

Front

Designing Financial Applications with BigDecimal?

BigDecimal ensures accurate monetary calculations. Using BigDecimal in financial applications ensures calculations align with business rules. It prevents…

View Card →
Flashcard Study

Java: BigDecimal and Money

Front

Understanding BigDecimal's Scale and Precision?

Scale represents decimal places, precision is total digits. BigDecimal's scale determines the number of digits to the right…

View Card →
Flashcard Study

Java: BigDecimal and Money

Front

BigDecimal Arithmetic Operations and Rounding Modes?

Specify rounding mode to handle non-exact results. When dividing BigDecimal, specify a rounding mode to handle cases where…

View Card →