Java MCQ Set 2

Explore this diverse selection of multiple-choice questions (MCQs) designed for various examinations. Java MCQ Set 2 focuses on essential aspects of the subject, ensuring comprehensive preparation across different categories and fields of study to enhance your knowledge and readiness. The right answers for each question is provided next to respective questions for your convenience, you can either attend the test or dirtectly access the right answers by clicking the show correct answer button

Each correct answer earns 1 mark, while each incorrect answer deducts 0.3 marks.
1. Which of these packages contains the exception StackOverflowError?
2. Which of these methods can be used to find the length of a string in Java?
3. What is the return type of the main method?
4. Which keyword is used in the declaration of a subclass?
5. Which of these can be used to create an abstract class?
6. Which of the following is true about inheritance in Java?
7. What is the default value of a static variable?
8. Which operator is used by Java run-time implementations to free the memory of an object?
9. Which of the following is not a method of the Object class?
10. What is byte code in the context of Java?
11. Which of the following is a valid keyword in Java?
12. Which of the following is not a valid Java keyword?
13. What is the size of int variable?
14. What is the return type of the hashCode() method in the Object class?
15. Which of these operators can be used to concatenate two or more String objects?
16. Which of the following is not a valid flow control statement?
17. Which keyword is used for exception handling in Java?
18. Which of the following is the correct way of implementing an interface?
19. Which of the following is used to find and fix bugs in the Java programs?
20. Which of the following is a reserved keyword in Java?
Question Navigation

Related MCQs

Java MCQ Set 1

Number of Questions: 20