Advanced java technical interview question
37. What are order of precedence and associativity, and how are they used? Order of precedence determines the order in […]
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
67. What is daemon thread and which method is used to create the daemon thread? Daemon thread is a low
61. When a thread is created and started, what is its initial state? A thread is in the ready state
55. If I write System.exit(0); at the end of the try block, will the finally block still execute? No. In
49. If I want an object of my class to be thrown as an exception object, what should I do?
3. What are wrapper classes? Java provides specialized classes corresponding to each of the primitive data types. These are called
3. What are wrapper classes? Java provides specialized classes corresponding to each of the primitive data types. These are called
37. What is the common usage of serialization? Whenever an object is to be sent over the network, objects need
25. Are the imports checked for validity at compile time? Example: will the code containing an import such as java.lang.ABCD
19. Can an application have multiple classes having main() method? Yes it is possible. While starting the application we mention
13. What if I write static public void instead of public static void? Program compiles and runs properly. 14. What
7. What is an Iterator? Some of the collection classes provide traversal of their contents via a java.util.Iterator interface. This
1. What is the difference between a constructor and a method? A constructor is a member function of a class
127. How does Java handle integer overflows and underflows? It uses those low order bytes of the result that can