Java Basic MCQs (Long Quiz)
This is the quiz about basics of Java. Students and new learner's can test their knowledge.
1. Which of the following option leads to the portability and security of Java?
Correct Answer
Wrong Answer
2. Which of the following is not a Java features?
Correct Answer
Wrong Answer
3. The u0021 article referred to as a
Correct Answer
Wrong Answer
4. _____ is used to find and fix bugs in the Java programs.
Correct Answer
Wrong Answer
5. Which of the following is a valid declaration of a char?
Correct Answer
Wrong Answer
6. What is the return type of the hashCode() method in the
Correct Answer
Wrong Answer
7. Which of the following is a valid long literal?
Correct Answer
Wrong Answer
8. What does the expression float a = 35 / 0 return?
Correct Answer
Wrong Answer
9. Evaluate the following Java expression, if x=3, y=5, and z=10: ++z + y - y + z + x++
Correct Answer
Wrong Answer
10. Which of the following tool is used to generate API documentation in HTML format from doc comments in source code?
Correct Answer
Wrong Answer
11. Which of the following creates a List of 3 visible items and multiple selections abled?
Correct Answer
Wrong Answer
12. Which of the following for loop declaration is not valid?
Correct Answer
Wrong Answer
13. Which method of the Class. class is used to determine the name of a class represented by the class object as a String?
Correct Answer
Wrong Answer
14. In which process, a local variable has the same name as one of the instance variables?
Correct Answer
Wrong Answer
15. Which of the following is true about the anonymous inner class?
Correct Answer
Wrong Answer
16. Which package contains the Random class?
Correct Answer
Wrong Answer
17. What do you mean by nameless objects?
Correct Answer
Wrong Answer
18. An interface with no fields or methods is known as a ______.
Correct Answer
Wrong Answer
19. Which of the following is an immediate subclass of the Panel class?
Correct Answer
Wrong Answer
20. Which option is false about the final keyword?
Correct Answer
Wrong Answer
21. Which of these classes are the direct subclasses of the Throwable class?
Correct Answer
Wrong Answer
22. What do you mean by chained exceptions in Java?
Correct Answer
Wrong Answer
23. In which memory a String is stored, when we create a string using new operator?
Correct Answer
Wrong Answer
24. What is the use of the intern() method?
Correct Answer
Wrong Answer
25. Which of the following is a marker interface?
Correct Answer
Wrong Answer
26. Which of the following is a reserved keyword in Java?
Correct Answer
Wrong Answer
27. Which keyword is used for accessing the features of a package?
Correct Answer
Wrong Answer
28. In java, jar stands for_____.
Correct Answer
Wrong Answer
29. Which of the following is false?
Correct Answer
Wrong Answer
30. What is the use of w in regex?
Correct Answer
Wrong Answer
What's Your Reaction?