Advanced java technical interview question
157. What is a compilation unit? A compilation unit is a Java source code file. 158. What interface is extended […]
157. What is a compilation unit? A compilation unit is a Java source code file. 158. What interface is extended […]
151. What is the difference between the File and RandomAccessFile classes? The File class encapsulates the files and directories of
45. What is the Set interface? The Set interface provides methods for accessing the elements of a finite mathematical set.
139. What Checkbox method allows you to tell if a Checkbox is checked? getState(). 140. What state is a thread
133. What is the difference between a field variable and a local variable? A field variable is a variable that
127. What is casting? There are two types of casting, casting between primitive numeric types and casting between object references.
121. Which class is the immediate superclass of the Container class? Component. 122. If a method is declared as protected,
115. What is the purpose of the File class? The File class is used to create objects that provide access
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.