-
-
What is the purpose of the File class
The File class is used to create objects that provide access to the files and directories of alocal file system.
-
Which Math method is used to calculate the absolute value of a number
The abs() method is used to calculate absolute values.
-
Can an exception be rethrown
Yes, an exception can be rethrown.
-
-
-
What is the SimpleTimeZone class
The SimpleTimeZone class provides support for a Gregorian calendar.
-
What is the Map interface
The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys withvalues.
-
Is &&= a valid Java operator
No, it is not.
-
-
To what value is a variable of the boolean type automatically initialized
The default value of the boolean type is false.
-
What is the purpose of a statement block
A statement block is used to organize a sequence of statements as a single statementgroup.
-
What modifiers may be used with a top-level class
A top-level class may be public, abstract, or final.
-
What is a layout manager
A layout manager is an object that is used to organize components in a container.
-
How can a dead thread be restarted
A dead thread cannot be restarted.
-
Does Java have destructors?
No garbage collector does the job working in the background
-
-
What is the List interface
The List interface provides support for ordered collections of objects.
-
What interface is extended by AWT event listeners
All AWT event listeners extend the java.util.EventListener interface.
-
Which arithmetic operations can result in the throwing of anArithmeticException
Integer / and % can result in the throwing of an ArithmeticException.
Java Interview Questions
Ans