KyaPoocha.com

Huge Collection of Interview Questions


Archive for May, 2007

Can a Byte object be cast to a double value? 

No, an object cannot be cast to a primitive value.  Read more »

What value does read() return when it has reached the end of a file? 

The read() method returns -1 when it has reached the end of a file.  Read more »

What are the high-level thread states? 

The high-level thread states are ready, running, waiting, and dead.  Read more »

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.  Read more »

How are commas used in the initialization and iteration parts of a for statement? 

Commas are used to separate multiple statements within the initialization and iteration parts of a for statement.  Read more »

Which containers may have a MenuBar? 

Frame  Read more »

What is the advantage of the event-delegation model over the earlier event-inheritance model? 

The event-delegation model has two advantages over the event-inheritance model. First, it enables event handling to be handled by objects other than the ones that... Read more »

Name two subclasses of the TextComponent class. 

TextField and TextArea  Read more »

What method is invoked to cause an object to begin executing as a separate thread? 

The start() method of the Thread class is invoked to cause an object to begin executing as a separate thread.  Read more »

Which Java operator is right associative? 

The = operator is right associative.  Read more »

What is the argument type of a program’s main() method? 

A program’s main() method takes an argument of the String[] type.  Read more »

What is the purpose of the finally clause of a try-catch-finally statement? 

The finally clause is used to provide the capability to execute code no matter whether or not an exception is thrown or caught.  Read more »

How many times may an object’s finalize() method be invoked by the garbage collector? 

An object’s finalize() method may only be invoked once by the garbage collector.  Read more »

Which Container method is used to cause a container to be laid out and redisplayed? 

validate()  Read more »

What is the GregorianCalendar class? 

The GregorianCalendar provides support for traditional Western calendars.  Read more »

Page 5 of 11« First...«34567»...Last »