🌍 Worldwide · Programming

Java Programming Syllabus

Roadmap to Java Programming. The full Java Programming syllabus: 6 chapters, 24 topics and 89 sub-topics, with 51 flashcards written against it.

6Chapters
24Topics
89Sub-topics
51Flashcards

Java Programming syllabus — full chapter and topic list

Expand any chapter to see its topics and sub-topics. This is the whole examinable outline for Java Programming, not a summary of it.

  1. Introduction to Java

    3 topics
    • History of Java
      • Origins
      • Evolution
      • Java Versions
    • Java Features
      • Object-Oriented
      • Platform Independent
      • Simple and Secure
      • Robust and Multithreaded
      • High Performance
    • Java Environment Setup
      • Download and Install JDK
      • Setting up IDE (Eclipse, IntelliJ, etc.)
      • Configuring Environment Variables
  2. Basic Syntax

    5 topics
    • Hello World Program
      • Structure of a Java Program
      • Main Method
      • Compiling and Running a Java Program
    • Data Types
      • Primitive Data Types
      • Non-Primitive Data Types
    • Variables
      • Declaration and Initialization
      • Scope of Variables
      • Type Casting
    • Operators
      • Arithmetic Operators
      • Relational Operators
      • Logical Operators
      • Assignment Operators
      • Bitwise Operators
    • Control Statements
      • If-Else
      • Switch
      • Loops (For, While, Do-While)
  3. Object-Oriented Programming

    5 topics
    • Classes and Objects
      • Class Definition
      • Creating Objects
      • Constructors
      • this Keyword
    • Inheritance
      • Types of Inheritance
      • super Keyword
      • Method Overriding
    • Polymorphism
      • Compile-time Polymorphism
      • Runtime Polymorphism
      • Method Overloading
    • Abstraction
      • Abstract Classes
      • Interfaces
    • Encapsulation
      • Access Modifiers
      • Getters and Setters
  4. Advanced Java Concepts

    6 topics
    • Exception Handling
      • Try-Catch Block
      • Finally Block
      • Throw and Throws
      • Custom Exceptions
    • Collections Framework
      • List
      • Set
      • Map
      • Queue
      • Iterator
    • Generics
      • Introduction to Generics
      • Generic Classes
      • Generic Methods
      • Bounded Types
    • Multithreading
      • Thread Class
      • Runnable Interface
      • Synchronization
      • Inter-thread Communication
      • Thread Pool
    • I/O Streams
      • Byte Streams
      • Character Streams
      • Buffered Streams
      • File Handling
    • Lambda Expressions
      • Syntax
      • Functional Interfaces
      • Method References
      • Stream API
  5. Java Development Tools

    3 topics
    • Maven
      • Introduction to Maven
      • POM.xml
      • Dependencies
      • Build Lifecycle
    • JUnit
      • Writing Test Cases
      • Annotations
      • Assertions
      • Test Suites
    • Logging
      • Log4j
      • SLF4J
      • Logging Levels
  6. Java Frameworks

    2 topics
    • Spring Framework
      • Introduction to Spring
      • Spring Core
      • Spring MVC
      • Spring Boot
      • Spring Data JPA
      • Spring Security
    • Hibernate
      • Introduction to Hibernate
      • ORM Concepts
      • Hibernate Annotations
      • Hibernate Query Language (HQL)
      • Caching

Java Programming flashcards

The complete Java Programming deck: 51 questions with worked answers.

  1. In what year was Java first released, who developed it, and what was its original name?

    Java was released in 1995 by Sun Microsystems (team led by James Gosling). It was originally named "Oak," then renamed to Java.

  2. What was the original target application area that motivated Java's creation?

    Java was originally designed for interactive television and embedded/consumer electronic devices (the "Green Project"), before being repurposed for the web.

  3. What is Java's famous design slogan, and what feature does it describe?

    "Write Once, Run Anywhere" (WORA). It describes platform independence: compiled Java bytecode runs on any device that has a JVM.

  4. List at least six core features (buzzwords) of Java.

    Simple, Object-Oriented, Platform-Independent, Secure, Robust, Multithreaded, Portable, High-Performance, Distributed, and Dynamic.

  5. Why is Java considered platform-independent while C/C++ are not?

    Java source compiles to architecture-neutral bytecode that runs on any Java Virtual Machine (JVM), whereas C/C++ compile directly to platform-specific machine code.

  6. Differentiate JDK, JRE, and JVM.

    JVM: abstract machine that executes bytecode. JRE: JVM + core libraries needed to run programs. JDK: JRE + development tools (compiler javac, debugger, etc.) needed to develop programs. Relationship: JDK ⊃ JRE ⊃ JVM.

  7. What does the javac command do and what file does it produce?

    javac is the Java compiler. It compiles a .java source file into a .class file containing platform-independent bytecode.

  8. What is the role of the JVM's JIT compiler?

    The Just-In-Time (JIT) compiler converts frequently executed bytecode into native machine code at runtime to improve performance.

  9. What is bytecode in Java?

    Bytecode is the intermediate, platform-independent instruction set (stored in .class files) produced by javac and executed/interpreted by the JVM.

  10. Write the minimal Java "Hello World" program.

    public class Main { public static void main(String[] args) { System.out.println("Hello, World!"); } }

  11. In the line public static void main(String[] args), what does each keyword mean?

    public: accessible everywhere; static: callable without creating an object; void: returns nothing; main: JVM entry point; String[] args: command-line arguments.

  12. Why must the public class name match the file name in Java?

    The Java compiler requires the file containing a public class to be named exactly <ClassName>.java; otherwise it produces a compile error.

  13. List the eight primitive data types in Java with their sizes.

    byte (8-bit), short (16-bit), int (32-bit), long (64-bit), float (32-bit), double (64-bit), char (16-bit), boolean (1-bit, JVM-dependent).

  14. What is the value range of a Java int?

    A 32-bit signed int ranges from $-2^{31}$ to $2^{31}-1$, i.e. $-2{,}147{,}483{,}648$ to $2{,}147{,}483{,}647$.

  15. Distinguish primitive types from reference types in Java.

    Primitives store the actual value directly (e.g. int, double). Reference types store a reference (address) to an object (e.g. String, arrays, classes). Primitives have a default like 0; references default to null.

  16. What is the difference between == and .equals() for objects?

    == compares references (whether two variables point to the same object); .equals() compares logical content/value (when properly overridden, e.g. in String).

  17. Name the three categories of variables in Java based on scope/declaration.

    Local variables (inside methods/blocks), instance variables (non-static fields of an object), and static/class variables (shared across all instances).

  18. What is the default value of an uninitialized instance variable of type boolean and of type int?

    boolean defaults to false; int defaults to 0. (Local variables have no default and must be initialized before use.)

  19. What does the final keyword do when applied to a variable?

    It makes the variable a constant—its value can be assigned only once and cannot be reassigned thereafter.

  20. List the categories of operators in Java.

    Arithmetic, Relational/Comparison, Logical, Bitwise, Assignment, Unary, Ternary, and Shift operators.

Show the other 31 Java Programming flashcards
  1. What does the modulo operator % return, and evaluate $17 \% 5$.

    It returns the remainder of integer division. $17 \% 5 = 2$.

  2. Explain the ternary operator with its syntax.

    Shorthand for if-else: condition ? valueIfTrue : valueIfFalse. Example: int max = (a > b) ? a : b;

  3. What is the difference between the logical operators & and && (and | vs ||)?

    && and || are short-circuit: they skip evaluating the right operand if the result is already determined. & and | always evaluate both operands (non-short-circuit).

  4. Differentiate prefix (++i) and postfix (i++) increment.

    Prefix ++i increments first, then returns the new value. Postfix i++ returns the current value, then increments. If i=5: int a=++i gives a=6; int b=i++ gives b=5 (then i=6).

  5. Name the looping control statements in Java.

    for loop, enhanced for-each loop, while loop, and do-while loop.

  6. What is the key difference between a while loop and a do-while loop?

    while checks the condition before executing the body (may run 0 times). do-while executes the body once before checking the condition (always runs at least once).

  7. What is the difference between break and continue?

    break exits the entire loop/switch immediately. continue skips the rest of the current iteration and proceeds to the next iteration.

  8. In a switch statement, what is the role of break and default?

    break terminates the switch to prevent "fall-through" into subsequent cases. default is the block executed when no case matches the value.

  9. Define a class and an object in Java.

    A class is a blueprint/template defining state (fields) and behavior (methods). An object is a concrete instance of a class, created with the new keyword and occupying memory.

  10. What is a constructor and how does it differ from a method?

    A constructor initializes a new object; it has the same name as the class, has no return type, and is called automatically with new. Unlike methods, it cannot be invoked explicitly later or return a value.

  11. What does the this keyword refer to?

    this refers to the current object instance. It is used to access instance members, disambiguate shadowed fields, or call another constructor (this(...)).

  12. Define the four pillars of Object-Oriented Programming.

    Encapsulation (bundling data + methods, hiding internals), Inheritance (deriving classes from others), Polymorphism (one interface, many forms), and Abstraction (exposing essentials, hiding details).

  13. What is inheritance and which keyword implements it in Java?

    Inheritance lets a subclass acquire fields and methods of a superclass, promoting code reuse. It is implemented with the extends keyword (and implements for interfaces).

  14. Does Java support multiple inheritance of classes? How is the limitation addressed?

    No—Java does not allow a class to extend multiple classes (to avoid the "diamond problem"). Multiple inheritance of type is achieved by implementing multiple interfaces.

  15. What does the super keyword do?

    super refers to the immediate parent class: it calls the parent constructor (super(...)) or accesses parent class methods/fields that are overridden or hidden.

  16. Differentiate method overloading and method overriding.

    Overloading: same method name, different parameter lists, within the same class (compile-time/static polymorphism). Overriding: subclass redefines a superclass method with the same signature (runtime/dynamic polymorphism).

  17. What is the difference between compile-time and runtime polymorphism?

    Compile-time (static) polymorphism is achieved via method overloading, resolved by the compiler. Runtime (dynamic) polymorphism is achieved via method overriding, resolved by the JVM through dynamic dispatch at execution.

  18. How is abstraction achieved in Java?

    Through abstract classes (declared abstract, may have abstract and concrete methods) and interfaces (contracts of method signatures), which hide implementation while exposing functionality.

  19. Compare an abstract class and an interface (pre-Java 8 distinctions).

    Abstract class: can have constructors, instance fields, and both abstract & concrete methods; a class extends only one. Interface: traditionally only abstract methods and constants (public static final); a class can implement many. (Java 8+ added default/static methods to interfaces.)

  20. What is encapsulation and how is it implemented in Java?

    Encapsulation binds data and methods together while restricting direct access. It is implemented by declaring fields private and exposing them through public getter and setter methods.

  21. What is the difference between a checked and an unchecked exception?

    Checked exceptions (subclasses of Exception, not RuntimeException) must be declared or handled at compile time (e.g. IOException). Unchecked exceptions (subclasses of RuntimeException) occur at runtime and need not be declared (e.g. NullPointerException).

  22. Describe the structure of a try-catch-finally block.

    try holds code that may throw an exception; catch handles a specific exception type; finally always executes (whether or not an exception occurred), typically for cleanup like closing resources.

  23. What is the difference between throw and throws?

    throw is a statement that explicitly raises an exception instance (throw new IOException();). throws is a clause in a method signature declaring which checked exceptions the method may propagate.

  24. What is the root class of the Java exception hierarchy, and how does Error differ from Exception?

    Throwable is the root; its two subclasses are Exception (recoverable, application-level problems) and Error (serious, usually unrecoverable JVM-level problems like OutOfMemoryError).

  25. What is the Java Collections Framework?

    A unified architecture of interfaces (List, Set, Queue, Map) and implementations (ArrayList, HashSet, LinkedList, HashMap, etc.) plus algorithms for storing and manipulating groups of objects.

  26. Differentiate List, Set, and Map in the Collections Framework.

    List: ordered, allows duplicates, index-based (ArrayList, LinkedList). Set: no duplicates, typically unordered (HashSet, TreeSet). Map: key-value pairs with unique keys (HashMap, TreeMap). Note: Map does not extend Collection.

  27. Compare ArrayList and LinkedList.

    ArrayList uses a dynamic array: fast random access $O(1)$, slower mid-list insert/delete $O(n)$. LinkedList uses a doubly linked list: fast insert/delete $O(1)$ at known nodes, slower random access $O(n)$.

  28. Compare HashMap and TreeMap.

    HashMap: unordered, allows one null key, average $O(1)$ access. TreeMap: sorted by key order (Red-Black tree), no null key, $O(\log n)$ access.

  29. What are generics and what key benefit do they provide?

    Generics allow types to be parameterized (e.g. List<String>), providing compile-time type safety and eliminating explicit casts, so type errors are caught at compilation rather than runtime.

  30. What is the difference between a process and a thread, and name the two ways to create a thread in Java.

    A process is an independent program with its own memory; a thread is a lightweight unit of execution within a process sharing its memory. Create a thread by extending Thread or implementing Runnable (then passing it to a Thread). The synchronized keyword prevents concurrent access to shared resources.

  31. What are the two main categories of Java I/O streams and what is the difference?

    Byte streams (InputStream/OutputStream) handle raw 8-bit binary data (e.g. FileInputStream). Character streams (Reader/Writer) handle 16-bit Unicode text data (e.g. FileReader, BufferedReader).

Java Programming syllabus FAQ

What is in the Java Programming syllabus?

The Java Programming syllabus is split into 6 chapters: Introduction to Java, Basic Syntax, Object-Oriented Programming, Advanced Java Concepts, Java Development Tools and Java Frameworks. Together they contain 24 topics and 89 sub-topics.

How many chapters and topics are in the Java Programming syllabus?

6 chapters and 24 topics, broken down further into 89 sub-topics. The largest chapter is Advanced Java Concepts, with 6 topics.

Are there Java Programming flashcards?

Yes — 51 question-and-answer flashcards, printed in full on this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.