Skip to content

Java Programming Practice Exam

Test yourself under real exam conditions: 50 timed questions, 60 on the clock, pass mark 70%%. Instant score with a full review of everything you got wrong. Free — no account needed.

📝 50 questions · ⏱ 60 minutes · 🎯 Pass mark 70% · 🆓 Free, no signup

Exam details

  • 50 questions drawn from 170 cards
  • Countdown timer — auto-submits when time runs out
  • Pass mark 70% (real certification threshold)
  • Full review of wrong answers at the end
  • No signup required — save your score with a free account

Sample Questions

5 shown

What is the JVM?

Show ▼

The Java Virtual Machine (JVM) is an abstract computing machine that executes Java bytecode. It provides platform independence by translating bytecode into native machine instructions at runtime, enabling the "Write Once, Run Anywhere" principle.

What is the difference between JDK, JRE, and JVM?

Show ▼

JDK (Java Development Kit) includes tools for developing Java programs.
JRE (Java Runtime Environment) provides libraries and JVM to run Java applications.
JVM (Java Virtual Machine) executes the bytecode. Relationship: JDK ⊃ JRE ⊃ JVM.

What are the four pillars of OOP in Java?

Show ▼

  • Encapsulation – bundling data and methods, restricting direct access
  • Inheritance – a class derives from another class
  • Polymorphism – one interface, many implementations
  • Abstraction – hiding complex details, showing only essentials

What is encapsulation in Java?

Show ▼

Encapsulation is the practice of keeping fields private and providing access through public getter and setter methods. This protects the internal state of an object and enforces data hiding.
Example: private int age; public int getAge() { return age; }

What is inheritance in Java?

Show ▼

Inheritance allows a class to acquire properties and methods of another class using the extends keyword. Java supports single inheritance for classes.
Example: class Dog extends Animal { }

🎯 Take the Java Programming Practice Exam