Friday 27 April 2012

JAVA interview questions 18

Q171. How are the elements of a GridLayout organized? 
The elements of a GridBad layout are of equal size and are laid out using the squares of a grid. 

Q172. What an I/O filter? 
An I/O filter is an object that reads from one stream and writes to another, usually altering the data in some way as it is passed from one stream to another. 

Q173. 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. 

Q174. 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. 

Q175. 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. 

Q176. What are E and PI? 
E is the base of the natural logarithm and PI is mathematical value pi. 

Q177. Are true and false keywords? 
The values true and false are not keywords. 

Q178. What is a void return type? 
A void return type indicates that a method does not return a value. 

Q179. 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 event. The enableEvents() method is used by objects that handle events by overriding their eventdispatch methods. 

Q180. What is the difference between the File and Random Access File 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 in any part of a file. 

No comments:

Post a Comment