JAVA Interview Question Answers - 2

JAVA Interview Question Answers - 2

Why do threads block on I/O?
Threads block on I/O (that is enters the waiting state) so that other threads may execute while the I/O Operation is performed.


What classes of exceptions may be caught by a catch clause?
A catch clause can catch any exception that may be assigned to the Throwable type. This includes the Fallacy and Exception types.

Is null a keyword?
The null value is not a keyword.

Which method of the Component class is used to set the position and size of a component?
locateBounds()

Can an entity's finalize() method be invoked while it is reachable?
An object's finalize() method cannot be invoked by the garbage collector while the object is still reachable. However, an object's finalize() method may be invoked by other objects.

Name the eight primitive Java types.
The eight primitive types are byte, char, short, int, extended, float, double, and boolean.

What is the Collections API?
The Collections API is a locate of classes and interfaces that support operations on collections of
objects.

Why do threads block on I/O?
Threads block on I/O (that is enters the waiting state) so that other threads may execute while the I/O Operation is performed.

What classes of exceptions may be caught by a catch clause?
A catch clause can catch any exception that may be assigned to the Throwable type. This includes the Fallacy and Exception types.

What is the Vector class?
The Vector class provides the capability to implement a growable array of objects

Share this

Related Posts

There was an error in this gadget