Flashcards
Single Responsibility Principle
Hover (or tap) to flip
A class should have one responsibility and therefore only one reason to change.
Learn moreOpen closed principle: Extension via abstraction
Hover (or tap) to flip
Use interfaces and polymorphism to add behavior without changing existing code.
Learn moreOpen/Closed Principle concept
Hover (or tap) to flip
Software entities should be open for extension but closed for modification.
Learn moreBehavioral substitutability
Hover (or tap) to flip
A subtype should not weaken preconditions or strengthen postconditions compared to its base type.
Learn moreLiskov Substitution Principle
Hover (or tap) to flip
Subclasses must be replaceable for their parent types without breaking expected behavior.
Learn moreWhy 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 moreJava application entry point
Hover (or tap) to flip
The main method is where the JVM begins execution of a Java program.
Learn moreReturn statement role
Hover (or tap) to flip
Returns a value to the caller (or exits the method) and ends method execution.
Learn moreJava method structure
Hover (or tap) to flip
Defines reusable behavior with optional parameters and a return type.
Learn moreStack vs Heap comparison
Hover (or tap) to flip
Stack handles method execution; heap manages dynamically allocated objects.
Learn moreStack memory function
Hover (or tap) to flip
Stores method calls, local variables, and execution context per thread.
Learn moreMethod area purpose
Hover (or tap) to flip
Stores class metadata, static variables, and the runtime constant pool.
Learn moreHeap memory role
Hover (or tap) to flip
Stores objects and instance data managed by the Garbage Collector.
Learn moreDebugging Java Code: Step execution strategy
Hover (or tap) to flip
Step Into enters method calls; Step Over executes them without entering.
Learn moreDebugger breakpoint
Hover (or tap) to flip
Pauses execution at a specific line to inspect variables and control flow.
Learn moreHow to prevent ArrayIndexOutOfBoundsException?
Hover (or tap) to flip
Always ensure index boundaries are checked before accessing arrays.
Learn moreArrayIndexOutOfBoundsException cause
Hover (or tap) to flip
Thrown when accessing an array index outside the valid range of 0 to length-1.
Learn moreMutable string concept
Hover (or tap) to flip
StringBuilder modifies an internal buffer instead of creating new String objects repeatedly.
Learn moreStringBuilder characteristics
Hover (or tap) to flip
A mutable, non-synchronized character sequence optimized for performance.
Learn moreSynchronization trade-off
Hover (or tap) to flip