Core Java MCQs
Core Java MCQs — Core Java.
1. What is the default value of a boolean variable in Java? a) true b) false c) 0 d) null
Answer: b) false
2. Which of these is not a primitive data type in Java? a) int b) float c) String d) char
Answer: c) String
3. Which keyword is used to inherit a class in Java? a) implements b) extends c) inherits d) super
Answer: b) extends
4. Which method is the entry point of a Java program? a) start() b) run() c) main() d) init()
Answer: c) main()
5. Which collection class does not allow duplicate elements? a) ArrayList b) LinkedList c) HashSet d) Vector
Answer: c) HashSet
6. What does JVM stand for? a) Java Virtual Machine b) Java Variable Method c) Java Verified Machine d) Java Virtual Method
Answer: a) Java Virtual Machine
7. Which of these is used to handle exceptions in Java? a) if-else b) try-catch c) switch d) for loop
Answer: b) try-catch
8. Which keyword prevents a class from being inherited? a) static b) private c) final d) protected
Answer: c) final
9. Which of these allows multiple inheritance-like behaviour in Java? a) Abstract class b) Interface c) Constructor d) Enum
Answer: b) Interface
10. Which memory area stores Java objects? a) Stack b) Heap c) Method Area d) Register
Answer: b) Heap
Key Points to Remember
- MCQ rounds usually test quick recall of definitions and keywords rather than deep reasoning.
- Reviewing all module summaries (topic "Key Points" sections) is a fast way to prepare for this kind of round.
- Practice a timed mock MCQ round before a real interview to build speed and confidence.