Wednesday, September 24, 2008

Java Technical Interview Questions and Answers

1)Does a class inherit the constructors of its super class?


A class does not inherit constructors from any of its superclasses.

2)Name primitive Java types.

The primitive types are byte, char, short, int, long, float, double, and Boolean.

3)Which class should you use to obtain design information about an object?


The Class class is used to obtain information about an object's design.

4)How can a GUI component handle its own events?


A component can handle its own events by implementing the required event-listener interface and adding itself as its own event listener.

5)How are the elements of a GridBagLayout organized?

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.

6)What advantage do Java's layout managers provide over traditional windowing systems?


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.


No comments:

Post a Comment

Thanks to given comments.......

My Blog List