Advanced java technical interview question
109. How are the elements of a GridBagLayout organized? The elements of a GridBagLayout are organized according to a grid. […]
109. How are the elements of a GridBagLayout organized? The elements of a GridBagLayout are organized according to a grid. […]
103. What restrictions are placed on the values of each case of a switch statement? During compilation, the values of
97. Is &&= a valid Java operator? No. It is not a valid java operator. 98. Name the eight primitive
97. Is &&= a valid Java operator? No. It is not a valid java operator. 98. Name the eight primitive
91. What is the Map interface? The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys
85. How is rounding performed under integer division? The fractional part of the result is truncated. This is known as
79. When can an object reference be cast to an interface reference? An object reference be cast to an interface
73. What is the difference between the String and StringBuffer classes? String objects are constants. StringBuffer objects are not constants.
67. How are Java source code files named? A Java source code file takes the name of a public class
61. What method is invoked to cause an object to begin executing as a separate thread? The start() method of
55. How many times may an object’s finalize() method be invoked by the garbage collector? An object’s finalize() method may
49. What invokes a thread’s run() method? After a thread is started, via its start() method or that of the
43. What class is the top of the AWT event hierarchy? The java.awt.AWTEvent class is the highest-level class in the
37. What are order of precedence and associativity, and how are they used? Order of precedence determines the order in
31. Name three Component subclasses that support painting. The Canvas, Frame, Panel, and Applet classes support painting. 32. What value
25. What are wrapped classes? Wrapped classes are classes that allow primitive types to be accessed as objects. 26. Does
19. What is an Iterator interface? The Iterator interface is used to step through the elements of a Collection. 20.
7. What’s new with the stop(), suspend() and resume() methods in JDK 1.2? The stop(), suspend() and resume() methods have
1. What is a transient variable? A transient variable is a variable that may not be serialized. 2. Which containers
1. What is a transient variable? A transient variable is a variable that may not be serialized. 2. Which containers
97. Difference between Swing and Awt? AWT are heavy-weight componenets. Swings are light-weight components. Hence swing works faster than AWT.
91. How many objects are created in the following piece of code? MyClass c1, c2, c3; c1 = new MyClass
85. Is delete a keyword in Java? No. delete is not a keyword in Java. Java does not make use
79. What is the catch or declare rule for method declarations? If a checked exception may be thrown within the
73. What are synchronized methods and synchronized statements? Synchronized methods are methods that are used to control access to an