-
What is the range of the char type
The range of the char type is 0 to 2^16 - 1.
-
What is the relationship between the Canvas class and the Graphics class
A Canvas object provides access to a Graphics object via its paint() method.
-
What is the % operator
It is referred to as the modulo or remainder operator. It returns the remainder of dividingthe first operandby the second operand.
-
What are wrapped classes
Wrapped classes are classes that allow primitive types to be accessed as objects.
-
-
Can a for statement loop indefinitely
Yes, a for statement can loop indefinitely. For example, consider the following:for(;;) ;
-
What is the GregorianCalendar class
The GregorianCalendar provides support for traditional Western calendars.
-
-
What is clipping
Clipping is the process of confining paint operations to a limited area or shape.
-
Which containers use a border Layout as their default layout
The window, Frame and Dialog classes use a border layout as their default layout.
-
Why do threads block on I/O
Threads block on i/o (that is enters the waiting state) so that other threads may executewhile the i/oOperation is performed.
-
Name three Component subclasses that support painting
The Canvas, Frame, Panel, and Applet classes support painting.
-
-
What interface must an object implement before it can be written to astream as an object
An object must implement the Serializable or Externalizable interface before it can bewritten to a stream as an object.
-
To what value is a variable of the boolean type automatically initialized
The default value of the boolean type is false.
-
Which java.util classes and interfaces support event handling
The EventObject class and the EventListener interface support event processing.
-
When is an object subject to garbage collection
An object is subject to garbage collection when it becomes unreachable to the program inwhich it is used.
-
What is a layout manager
A layout manager is an object that is used to organize components in a container.
-
What is a compilation unit
A compilation unit is a Java source code file.
-
What interface is extended by AWT event listeners
All AWT event listeners extend the java.util.EventListener interface.
Java Interview Questions
Ans