Single Responsibility Principle

Hover (or tap) to flip

A class should have one responsibility and therefore only one reason to change.

Learn more

Open closed principle: Extension via abstraction

Hover (or tap) to flip

Use interfaces and polymorphism to add behavior without changing existing code.

Learn more

Open/Closed Principle concept

Hover (or tap) to flip

Software entities should be open for extension but closed for modification.

Learn more

Behavioral substitutability

Hover (or tap) to flip

A subtype should not weaken preconditions or strengthen postconditions compared to its base type.

Learn more

Liskov Substitution Principle

Hover (or tap) to flip

Subclasses must be replaceable for their parent types without breaking expected behavior.

Learn more

Why do you need a JDK?

Hover (or tap) to flip

You need the JDK to compile and run Java applications (JRE alone is not enough for development).

Learn more

Java application entry point

Hover (or tap) to flip

The main method is where the JVM begins execution of a Java program.

Learn more

Return statement role

Hover (or tap) to flip

Returns a value to the caller (or exits the method) and ends method execution.

Learn more

Java method structure

Hover (or tap) to flip

Defines reusable behavior with optional parameters and a return type.

Learn more

Stack vs Heap comparison

Hover (or tap) to flip

Stack handles method execution; heap manages dynamically allocated objects.

Learn more

Stack memory function

Hover (or tap) to flip

Stores method calls, local variables, and execution context per thread.

Learn more

Method area purpose

Hover (or tap) to flip

Stores class metadata, static variables, and the runtime constant pool.

Learn more

Heap memory role

Hover (or tap) to flip

Stores objects and instance data managed by the Garbage Collector.

Learn more

Debugging Java Code: Step execution strategy

Hover (or tap) to flip

Step Into enters method calls; Step Over executes them without entering.

Learn more

Debugger breakpoint

Hover (or tap) to flip

Pauses execution at a specific line to inspect variables and control flow.

Learn more

How to prevent ArrayIndexOutOfBoundsException?

Hover (or tap) to flip

Always ensure index boundaries are checked before accessing arrays.

Learn more

ArrayIndexOutOfBoundsException cause

Hover (or tap) to flip

Thrown when accessing an array index outside the valid range of 0 to length-1.

Learn more

Mutable string concept

Hover (or tap) to flip

StringBuilder modifies an internal buffer instead of creating new String objects repeatedly.

Learn more

StringBuilder characteristics

Hover (or tap) to flip

A mutable, non-synchronized character sequence optimized for performance.

Learn more

Synchronization trade-off

Hover (or tap) to flip

Synchronization increases safety but may decrease execution speed.

Learn more