KyaPoocha.com

Huge Collection of Interview Questions


Archive for June, 2007

What is a compilation unit? 

A compilation unit is a Java source code file.  Read more »

What is the purpose of garbage collection? 

The purpose of garbage collection is to identify and discard objects that are no longer needed by a program so that their resources may be reclaimed and reused.  Read more »

How are this and super used? 

this is used to refer to the current object instance. super is used to refer to the variables and methods of the superclass of the current object instance.  Read more »

What interface must an object implement before it can be written to a stream as an object? 

An object must implement the Serializable or Externalizable interface before it can be written to a stream as an object.  Read more »

Which package is always imported by default? 

The java.lang package is always imported by default.  Read more »

What is your platform’s default character encoding? 

If you are running Java on English Windows platforms, it is probably Cp1252. If you are running Java on English Solaris platforms, it is most likely 8859_1..  Read more »

What happens when you add a double value to a String? 

The result is a String object.162.  Read more »

What is the difference between the File and RandomAccessFile classes? 

The File class encapsulates the files and directories of the local file system. The RandomAccessFile class provides the methods needed to directly access data contained... Read more »

What is the purpose of the enableEvents() method? 

The enableEvents() method is used to enable an event for a particular object. Normally, an event is enabled when a listener is added to an object for a particular... Read more »

What is a void return type? 

A void return type indicates that a method does not return a value.  Read more »

Are true and false keywords? 

The values true and false are not keywords.  Read more »

What are E and PI? 

E is the base of the natural logarithm and PI is mathematical value pi.  Read more »

What classes of exceptions may be thrown by a throw statement? 

A throw statement may throw any expression that may be assigned to the Throwable type.  Read more »

What is the Set interface? 

The Set interface provides methods for accessing the elements of a finite mathematical set. Sets do not allow duplicate elements.  Read more »

If an object is garbage collected, can it become reachable again? 

Once an object is garbage collected, it ceases to exist. It can no longer become reachable again.  Read more »

Page 1 of 212»