Loading...
QUIZ

Certification Test

 
Que No. 1 ) Which class in Java is the superclass for all other classes?

A.) Object
B.) Main
C.) Superclass
D.) Parent


Que No. 2 ) What is the purpose of the "finalize" method in Java?

A.) To force an object to be garbage collected
B.) To mark an object as immutable
C.) To check if an object is null
D.) To compare two objects for equality


Que No. 3 ) Which Java package contains classes for input and output operations?

A.) java.util
B.) java.io
C.) java.net
D.) java.lang


Que No. 4 ) What is the maximum value that can be held by a byte data type in Java?

A.) 127
B.) 255
C.) 2147483647
D.) 32767


Que No. 5 ) Which of the following is not a valid access modifier in Java?

A.) private
B.) protected
C.) package-private
D.) internal


Que No. 6 ) Which Java keyword is used for multithreading?

A.) async
B.) await
C.) synchronized
D.) thread


Que No. 7 ) What is the purpose of the "default" label in a switch statement in Java?

A.) To specify the default value of a variable
B.) To indicate a default case when none of the other cases match
C.) To set a default value for a method parameter
D.) To define a default constructor for a class


Que No. 8 ) Which Java operator is used to perform logical AND?

A.) &
B.) &&
C.) |
D.) ||


Que No. 9 ) What is the Java term for a class that inherits properties and behaviors from another class?

A.) Superclass
B.) Subclass
C.) Parent class
D.) Base class


Que No. 10 ) What is the purpose of the "volatile" keyword in Java?

A.) To declare a variable as a constant
B.) To indicate that a variable can change asynchronously
C.) To make a variable thread-safe
D.) To define a variable as global