C Interview Questions
JAVA Interview Questions
PHP Interview Questions
.Net Interview Questions
HTML Interview Questions
HR Interview Questions
When a thread blocks on I/O, what state does it enter?
A thread enters the waiting state when it blocks on I/O.
To what value is a variable of the String type automatically initialized?
The default value of an String type is null.
What is the catch or declare rule for method declarations?
If a checked exception may be thrown within the body of a method, the method must either catch the exception or declare it in its throws clause.
What is the difference between a MenuItem and a CheckboxMenuItem?
The CheckboxMenuItem class extends the MenuItem class to support a menu item that may be checked or unchecked.
What is a task's priority and how is it used in scheduling?
A task's priority is an integer value that identifies the relative order in which it should be executed with respect to other tasks. The scheduler attempts to schedule higher priority tasks before lower priority tasks.
What class is the top of the AWT event hierarchy?
The java.awt.AWTEvent class is the highest-level class in the AWT event-class hierarchy.
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.
Can an anonymous class be declared as implementing an interface and extending a class?
An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.
What is the range of the short type?
The range of the short type is -(2^15) to 2^15 - 1.
In which package are most of the AWT events that support the event-delegation model defined?
Most of the AWT-related events of the event-delegation model are defined in the java.awt.event package. The AWTEvent class is defined in the java.awt package.