Java Quiz

In this Java Language Quiz section - every Question Carries 2 Marks. If any question is wrong then two marks will be deducted.

Note: - Fill the information Correctly to get Certified.

Java Quiz

1 / 50

Which of the following is NOT a primitive data type in Java? 

2 / 50

Which keyword is used to define a subclass in Java?

3 / 50

What does the static keyword mean in Java?

4 / 50

Which of the following is a correct way to declare a constant in Java? 

5 / 50

What does the super keyword do in Java?

6 / 50

What is the correct way to declare a constant variable in Java?

7 / 50

Which of the following is NOT a valid Java identifier?

8 / 50

What is the purpose of the break statement in Java?

9 / 50

What is the result of 10 % 3 in Java?

10 / 50

Which of the following is true about Java interfaces?

11 / 50

What does the compareTo() method of the Comparable interface return?

12 / 50

What does the finally block in a Java try-catch-finally statement do?

13 / 50

Which of the following access modifiers restricts access the most in Java?

14 / 50

What is the purpose of the super() keyword in Java?

15 / 50

Which of the following statements is true about static methods in Java?

16 / 50

What does the instanceof operator do in Java?

17 / 50

What is the purpose of the this keyword in Java?

18 / 50

Which of the following statements is true about Java packages?

19 / 50

Which of the following statements is true about Java interfaces?

20 / 50

Which keyword is used to prevent a method from being overridden in Java?

21 / 50

What does the super keyword refer to in Java?

22 / 50

What is the default value of a boolean variable in Java?

23 / 50

What is the purpose of the toString() method in Java?

24 / 50

Which of the following is NOT a valid access modifier in Java?

25 / 50

Which of the following is NOT a valid access modifier in Java?

26 / 50

What is the difference between == and .equals() method in Java?

27 / 50

What is the maximum value that an int variable can hold in Java?

28 / 50

Which of the following is used to create an object in Java?

29 / 50

What is the purpose of the instanceof operator in Java?

30 / 50

Which of the following statements is true about Java's ArrayList and LinkedList classes?

31 / 50

What does the static keyword mean when applied to a method in Java?

32 / 50

Which of the following is true about method overloading in Java?

33 / 50

What is the purpose of the this keyword in Java?

34 / 50

Which of the following statements about Java packages is false?

35 / 50

What does the Math.random() method in Java return?

36 / 50

Which of the following is NOT a valid type of loop in Java?

37 / 50

What is the purpose of the static keyword when applied to a variable in Java?

38 / 50

Which of the following is NOT a primitive data type in Java?

39 / 50

Which of the following is true about Java constructors?

40 / 50

Which of the following is true about Java's HashSet class?

41 / 50

Which of the following is NOT a valid Java annotation?

42 / 50

Which of the following modifiers makes a method or variable accessible only within its own package?

43 / 50

What does the StringBuffer class in Java provide that String does not?

44 / 50

Which keyword is used to create an instance of a class in Java?

45 / 50

Which of the following statements about Java arrays is true?

46 / 50

Which of the following is true about Java's HashMap class?

47 / 50

Which of the following is true about Java's StringBuilder class?

48 / 50

Which of the following access modifiers allows a member to be accessed only within its own class and package?

49 / 50

Which of the following statements is true about Java's LinkedList class?

50 / 50

Which of the following statements about Java's HashSet class is true?

Your score is

The average score is 0%

0%

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top