Java

93 articles in this topic

JVM Architecture and Lifecycle MCQs: 12 Solved Java Questions with Explanations

Solve 12 published JVM questions, then use the explanations to separate bytecode, loading, execution, memory areas, reachability and runtime type checks.

Updated 17 Nov 20267 min readJava

Java Features and Basics MCQs: 12 Solved Questions with Explanations

Test your Java foundation with 12 solved MCQs, then trace the rules behind compilation, naming, classes, packages and two small programs.

Updated 16 Nov 20267 min readJava

final Keyword in Java: Constants, Inheritance Limits and Restrictions

Learn what Java's final keyword fixes in each declaration position, then trace assignment, array mutation, method inheritance, arithmetic, and compiler errors.

Updated 16 Nov 20266 min readJava

Reflection in Java Tutorial: Inspect Classes and Invoke Methods at Runtime

Learn Java Reflection from its Class<?> entry point to runtime construction, field access and method invocation. Trace one complete program and diagnose its common failures.

Updated 15 Nov 20266 min readJava

ArrayList and LinkedList in Java: Runnable Examples, Costs and Common Errors

Build a reliable mental model for Java lists, run two complete programs, compare operation costs, and avoid overload, bounds and traversal traps.

Updated 14 Nov 20265 min readJava

Records and Sealed Classes in Java: Runnable Examples and Rules

Learn when to use a Java record and when to seal a hierarchy. Compile two complete examples, trace their output, and fix the mistakes learners often make.

Updated 13 Nov 20266 min readJava

Lambda Expressions in Java: From Syntax to Streams with Runnable Examples

Learn Java lambdas from an anonymous class onward, then trace target types, stream operations, captured variables and common compiler failures with exact outputs.

Updated 12 Nov 20266 min readJava

JVM Architecture in Java: Class Loading, Memory Areas and a Bytecode Trace

Trace a runnable Java program from source to class files, class initialization, run-time memory areas and selected bytecode instructions.

Updated 11 Nov 20265 min readJava

Functional Interfaces in Java: SAM Rules, Lambdas and Runnable Examples

Build functional interfaces from zero, replace an anonymous class with a lambda, select standard interfaces by shape, and avoid common compiler traps.

Updated 10 Nov 20265 min readJava

TreeMap and SortedMap in Java: Ordering, Range Views and Worked Examples

Learn how Java's TreeMap orders keys, answers floor and ceiling queries, exposes live range views, and handles comparator collisions through worked examples.

Updated 9 Nov 20266 min readJava

HashSet and TreeSet in Java: Runnable Examples and Key Differences

Learn how Java sets handle duplicates, ordering, navigation and custom objects through deterministic examples you can run and modify.

Updated 8 Nov 20265 min readJava

Java Garbage Collection Tutorial: Reachability, Leaks and Runnable Examples

Trace three connected objects, find exactly when each becomes eligible for collection, and repair a cache that keeps byte arrays reachable.

Updated 7 Nov 20266 min readJava