Q1: Which keyword is used to prevent a method from being overridden?
Q2: What is the primary purpose of the 'finally' block in a try-catch-finally statement?
Q3: Which data structure follows the LIFO (Last-In, First-Out) principle?
Q4: What is the default value of a static integer variable in Java?
Q5: Which of the following is NOT a core feature of Object-Oriented Programming?
Q6: What is the purpose of the 'super' keyword in Java?
Q7: Which interface is used to define a single abstract method in Java 8 and later?
Q8: What is the output of `System.out.println(5 + "5");`?
Q9: Which collection interface does NOT allow duplicate elements?
Q10: What is the role of a constructor in a Java class?
Q11: Which access modifier provides the most restrictive access?
Q12: What is the purpose of the `volatile` keyword in Java?
Q13: Which exception is thrown when you try to access an array element with an invalid index?
Q14: What is the difference between `==` and `.equals()` in Java?
Q15: Which design pattern ensures that only one instance of a class is created?
Q16: What is the purpose of garbage collection in Java?
Q17: Which of the following is an immutable class in Java?
Q18: What is the difference between an interface and an abstract class?
Q19: Which annotation is used to suppress compiler warnings in Java?
Q20: What is multithreading?
Q21: What is serialization?
Q22: Which keyword is used to create a constant variable?
Q23: What is the use of try-with-resources?
Q24: What is the role of JVM?
Q25: What is reflection in Java?
Q26: What is the purpose of annotations in Java?
Q27: Which of the following is a checked exception?
Q28: What is the difference between ArrayList and LinkedList?
Q29: What is the use of HashMap?
Q30: What is a deadlock?
Your Score: 0 / 30
How many correct answers out of total questions.comment in the below comment section.