-
-
What is the difference between a while statement and a do statement
A while statement checks at the beginning of a loop to see whether the next loop iterationshould occur. A do statement checks at the end of a loop to see whether the next iterationof a loop should occur. The do statement will always execute the body of a loop at leastonce.
-
What is the difference between a static and a non-static inner class
A non-static inner class may have object instances that are associated with instances ofthe class's outer class. A static inner class does not have any object instances.
-
What is the role of extends in java?
Explain with an example how do you use extends in java
-
Anonymous Class
What is anonymous class? What is its use in Java?
-
Volatile Modifier
What is volatile modifier in Java? How it is useful?
-
Inheritance in java
Is super class object gets initiated while creating the subclass object? what happen in heap and stack when call super class method from subclass and call super class constructor by using super keyword from subclass?
-
-
_________ is used to destroy the objects created by the constructor methods.
Skill/Topic: AWT & AppletsA) finalize()
-
-
Which java.util classes and interfaces support event handling
The EventObject class and the EventListener interface support event processing.
-
-
-
Applet Newline
How to give newline after creating level or textfield in Java Applet?
-
-
Garbage Collector
What are the 4 stages of garbage collector? How and when Garbage collector comes into picture? What is the importance of finalize method?
-
Exception handling catch block?
Please observe the following code....public class MyClass{ public static void main(String[] args) { try{ //code here }catch(Exception e) { System.out.println(e); } }}if the try block throws an ArithmeticException,NullPointerException,etc....we can handle the exception...Because those are the sub classes of Exception class...The Question...
-
What is the difference between the prefix and postfix forms of the ++ operator
The prefix form performs the increment operation and returns the value of the incrementoperation. The postfix form returns the current value all of the expression and thenperforms the increment operation on that value.
-
-
Java Interview Questions
Ans