StackTipsStackTips
Javaintermediate

Java Intermediate - OOP and Collections Quiz

Test your knowledge of Object-Oriented Programming concepts and Java Collections Framework

15 questions25 min

This intermediate-level quiz covers advanced OOP concepts including inheritance, polymorphism, abstraction, encapsulation, and the Java Collections Framework. Perfect for developers with basic Java knowledge looking to level up their skills.

Topics covered include: abstract classes, interfaces, ArrayList, HashMap, LinkedList, generics, and more.

0/15 checked
  1. 01

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

  2. 02

    Which collection allows duplicate elements and maintains insertion order?

  3. 03

    What is the time complexity for adding an element to a HashMap?

  4. 04

    What will happen if you try to add a null key to a TreeMap?

  5. 05

    Which of the following is true about method overriding?

  6. 06

    What is the difference between ArrayList and LinkedList?

  7. 07

    What is the purpose of the 'super' keyword in Java?

  8. 08

    Which interface should a class implement to be used as a key in a HashMap?

  9. 09

    What is a marker interface in Java?

  10. 10

    What is the output of: List<String> list = Arrays.asList("A", "B"); list.add("C");

  11. 11

    What is autoboxing in Java?

  12. 12

    Which collection is thread-safe in Java?

  13. 13

    What does the 'instanceof' operator do?

  14. 14

    What is the diamond problem in Java?

  15. 15

    What is the purpose of the Comparable interface?