-
-
-
-
-
-
-
What is the preferred size of a component
The preferred size of a component is the minimum component size that will allow thecomponent to display normally.
-
What method is used to specify a container's layout
The setLayout() method is used to specify a container's layout.
-
What state does a thread enter when it terminates its processing
When a thread terminates its processing, it enters the dead state.
-
What is the Collections API
The Collections API is a set of classes and interfaces that support operations oncollections of objects.
-
What is the Vector class
The Vector class provides the capability to implement a growable array of objects
-
25. Is sizeof a keyword
The sizeof operator is not a keyword.
-
Can an object's finalize() method be invoked while it is reachable
An object's finalize() method cannot be invoked by the garbage collector while the objectis still reachable. However, an object's finalize() method may be invoked by otherobjects.
-
What class is the top of the AWT event hierarchy
The java.awt.AWTEvent class is the highest-level class in the AWT event-classhierarchy.
-
When a thread is created and started, what is its initial state
A thread is in the ready state after it has been created and started.
-
What is the argument type of a program's main() method
A program's main() method takes an argument of the String[] type.
-
What is the purpose of the wait(), notify(), and notifyAll() methods
The wait(),notify(), and notifyAll() methods are used to provide an efficient way forthreads to wait for a shared resource. When a thread executes an object's wait() method, itenters the waiting state. It only enters the ready state after another thread invokes theobject's notify() or notifyAll() methods..
-
What modifiers may be used with an interface declaration
An interface may be declared as public or abstract.
-
What is the difference between a while statement and a do statement
A while statement checks at the beginning of a loop to see whether the next loop iterationshould occur. A do statement checks at the end of a loop to see whether the next iterationof a loop should occur. The do statement will always execute the body of a loop at leastonce.
-
When does the compiler supply a default constructor for a class
The compiler supplies a default constructor for a class if no other constructors areprovided.
Java Interview Questions
Ans