Java foundamental: 18 MCQs with answers

All 18 multiple-choice questions from this kit, free and with no sign-up.

Warm-up · 10 questions

Q1. What is the purpose of the `public static void main(String[] args)` method in Java?

Beginner
Show answer & explanation

—

Q2. What does the `final` keyword mean when applied to a variable?

Beginner
Show answer & explanation

—

Q3. What is a constructor in Java?

Beginner
Show answer & explanation

—

Q4. What is the purpose of the `this` keyword in Java?

Beginner
Show answer & explanation

—

Q5. What is the purpose of the `static` keyword in Java?

Beginner
Show answer & explanation

—

Q6. What is the purpose of the `try-catch` block in Java?

Beginner
Show answer & explanation

—

Q7. What does the `super` keyword do in Java?

Beginner
Show answer & explanation

—

Q8. What is the difference between `public`, `private`, and `protected` access modifiers?

Beginner
Show answer & explanation

—

Q9. What is the purpose of the `instanceof` operator?

Beginner
Show answer & explanation

—

Q10. What is the difference between `break` and `continue` in loops?

Beginner
Show answer & explanation

—

Building up · 8 questions

Q11. What is the difference between `int` and `Integer` in Java?

Intermediate
Show answer & explanation

—

Q12. Explain the concept of garbage collection in Java.

Intermediate
Show answer & explanation

—

Q13. What is the difference between `==` and `.equals()` in Java?

Intermediate
Show answer & explanation

—

Q14. What is the difference between an abstract class and an interface in Java?

Intermediate
Show answer & explanation

—

Q15. What is the difference between method overloading and method overriding?

Intermediate
Show answer & explanation

—

Q16. What is the difference between `ArrayList` and `LinkedList` in Java?

Intermediate
Show answer & explanation

—

Q17. What is the difference between checked and unchecked exceptions in Java?

Intermediate
Show answer & explanation

—

Q18. What is the purpose of the `StringBuilder` class?

Intermediate
Show answer & explanation

—

Make your own

Your notes can be a kit like these

Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free, in 42 languages.

  • Chapter notes
  • Flashcards
  • Practice MCQs
  • Scored tests
  • Exam prep

Get Veda free See what students get

Free to start · No ads · Works in 42 languages