Java Interview Questions - Page 10

Question: Which class should you use to obtain design information about an object? Answer: The Class class is used to obtain information about an object's design.


 

Ads

Tutorials   
Hibernate Interview Questions - What is Hibernate Framework? Hibernate Interview Questions JSF Basic Interview Questions Important Interview Questions in Core Java Core java Interview Questions XML Interviews Question page8,xml Interviews Guide,xml Interviews XML Interviews Question page7,xml Interviews Guide,xml Interviews XML Interviews Question page6,xml Interviews Guide,xml Interviews XML Interviews Question page5,xml Interviews Guide,xml Interviews XML Interviews Question page1,xml Interviews Guide,xml Interviews XML Interviews Question page30,xml Interviews Guide,xml Interviews XML Interviews Question page29,xml Interviews Guide,xml Interviews XML Interviews Question page28,xml Interviews Guide,xml Interviews XML Interviews Question page27,xml Interviews Guide,xml Interviews XML Interviews Question page26,xml Interviews Guide,xml Interviews XML Interviews Question page25,xml Interviews Guide,xml Interviews XML Interviews Question page24,xml Interviews Guide,xml Interviews XML Interviews Question page23,xml Interviews Guide,xml Interviews XML Interviews Question page22,xml Interviews Guide,xml Interviews XML Interviews Question page21,xml Interviews Guide,xml Interviews XML Interviews Question page1,xml Interviews Guide,xml Interviews XML Interviews Question page18,xml Interviews Guide,xml Interviews XML Interviews Question page17,xml Interviews Guide,xml Interviews XML Interviews Question page16,xml Interviews Guide,xml Interviews XML Interviews Question page15,xml Interviews Guide,xml Interviews XML Interviews Question page14,xml Interviews Guide,xml Interviews XML Interviews Question page13,xml Interviews Guide,xml Interviews XML Interviews Question page11,xml Interviews Guide,xml Interviews XML Interviews Question page1,xml Interviews Guide,xml Interviews SQL PL/SQL Terms Deadlock JSF Interview Questions Tomahawk inputCalendar tag Java Questions & Java FAQ J2EE Interviews Question page9,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page8,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page7,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page6,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page5,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page4,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page3,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page20,J2EE Interviews Guide,J2EE Interviews J2EE interview questions page2,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page19,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page18,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page17,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page16,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page15,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page14,J2EE Interviews Guide,J2EE Interviews
Ads

Java Interview Questions - Page 10

     

Question: Which class should you use to obtain design information about an object?
Answer:
The Class class is used to obtain information about an object's design.

Question: How can a GUI component handle its own events?
Answer:
A component can handle its own events by implementing the required event-listener interface and adding itself as its own event listener.

Question:  How are the elements of a GridBagLayout organized?
Answer:
The elements of a GridBagLayout are organized according to a grid. However, the elements are of different sizes and may occupy more than one row or column of the grid. In addition, the rows and columns may have different sizes.

Question: What advantage do Java's layout managers provide over traditional windowing systems? 
Answer:
Java uses layout managers to lay out components in a consistent manner across all windowing platforms. Since Java's layout managers aren't tied to absolute sizing and positioning, they are able to accommodate platform-specific differences among windowing systems.

Question: What are the problems faced by Java programmers who don't use layout managers?
Answer:
Without layout managers, Java programmers are faced with determining how their GUI will be displayed across multiple windowing systems and finding a common sizing and positioning that will work within the constraints imposed by each windowing system.

Question: What is the difference between static and non-static variables?
Answer:
A static variable is associated with the class as a whole rather than with specific instances of a class. Non-static variables take on unique values with each object instance.

Question: What is the difference between the paint() and repaint() methods?
Answer:
  The paint() method supports painting via a Graphics object. The repaint() method is used to cause paint() to be invoked by the AWT painting thread.

Question:  What is the purpose of the File class?
Answer:
The File class is used to create objects that provide access to the files and directories of a local file system.

Question:  What restrictions are placed on method overloading?
Answer:
Two methods may not have the same name and argument list but different return types.

Question:  What restrictions are placed on method overriding?
Answer:
Overridden methods must have the same name, argument list, and return type. The overriding method may not limit the access of the method it overrides. The overriding method may not throw any exceptions that may not be thrown by the overridden method.

Question: What is casting?
Answer:
There are two types of casting, casting between primitive numeric types and casting between object references. Casting between numeric types is used to convert larger values, such as double values, to smaller values, such as byte values. Casting between object references is used to refer to an object by a compatible class, interface, or array type reference.

Question: Name Container classes.
Answer:
Window, Frame, Dialog, FileDialog, Panel, Applet, or ScrollPane

Advertisements

Ads
Share on Google+Share on Google+

Java Interview Questions - Page 10

Posted on: January 18, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

Discuss: Java Interview Questions - Page 10   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads