Java MCQs 50 Questions Set for your Exam
#1. Which collection class is synchronized?
#2. What is the size of a float variable in Java?
#3. Which of the following is not a valid wrapper class in Java?
#4. What is the output of ‘System.out.println(10 + “20”);’?
#5. What is the default value of a boolean variable in Java?
#6. What is the output of “System.out.println(2 + 3 * 4);”?
#7. What is the purpose of the “static” keyword in Java?
#8. Which of these is not a Java access modifier?
#9. What is the default access modifier in Java?
#10. Which of the following is true about Java?
#11. Which of these is a valid method declaration in Java?
#12. How can you define a constant in Java?
#13. Which keyword is used to stop the execution of a loop?
#14. Which interface is used to implement a collection that does not allow duplicate elements?
#15. What is the result of “true && false” in Java?
#16. Which of the following statements is true about constructors?
#17. What is the result of “3 >> 1” in Java?
#18. What is the output of “System.out.println(5 / 2);”?
#19. Which method is used to start a thread in Java?
#20. Which class is used to take input from the user in Java?
#21. What is the purpose of the “break” statement in Java?
#22. What is the default value of an int variable in Java?
#23. Which exception is thrown when dividing by zero in Java?
#24. Which of these is used to handle exceptions in Java?
#25. Which of the following is not part of the Java runtime environment?
#26. Which of these methods is used to read a character from standard input in Java?
#27. Which of these is not a reserved keyword in Java?
#28. Which class is used to handle file operations in Java?
#29. What does the “final” keyword in Java do?
#30. What is the purpose of the “super” keyword in Java?
#31. What is the parent class of all classes in Java?
#32. Which of these is not an exception handling keyword?
#33. How do you declare an array in Java?
#34. What does the ‘this’ keyword refer to?
#35. Which of these is not a valid method of the Math class?
#36. What is the default value of a reference variable in Java?
#37. What is the extension of compiled Java files?
#38. Which operator is used to concatenate strings in Java?
#39. How do you declare a class as abstract in Java?
#40. Which keyword is used to inherit a class in Java?
#41. What is the purpose of the “volatile” keyword?
#42. What is a correct way to create an object in Java?
#43. What is the purpose of the “instanceof” keyword?
#44. Which of the following is not a primitive data type in Java?
#45. What is the result of “Math.sqrt(16)”?
#46. Which of these is not a feature of the Java programming language?
#47. Which package contains the Random class?
#48. Which of the following is not a feature of Java?
#49. What is the correct way to import a package in Java?
#50. How many threads can run simultaneously in a single Java program?
Results
Congratulations
Better Luck Next Time
Java MCQs 50 Questions Set
Disclaimer:
The information in this booklet is provided for general purposes only. We make no guarantees or assurances, whether express or implied, regarding the completeness, accuracy, reliability, suitability, or availability of the information, products, services, or related graphics provided. Any reliance you place on this information is entirely at your own risk.
We will not be liable for any loss or damage, including but not limited to indirect or consequential loss or damage, or any loss or damage arising from the loss of data or profits, resulting from the use of this question bank. The use of any information is at your sole discretion and responsibility. You are fully accountable for any actions you take or choose not to take based on this material.