- 
                    Can an object be garbage collected while it is still reachableA reachable object cannot be garbage collected. Only unreachable objects may begarbage collected.. 
- 
                    What are the Object and Class classes used forThe Object class is the highest-level class in the Java class hierarchy. The Class class isused to represent the classes and interfaces that are loaded by a Java program.. 
- 
                    What is the ResourceBundle classThe ResourceBundle class is used to store locale-specific resources that can be loaded bya program to tailor the program's appearance to the particular locale in which it is beingrun. 
- 
                    Dynamic method DispatchWhat is dynamic method dispatch? 
- 
                    What is the Set interfaceThe Set interface provides methods for accessing the elements of a finite mathematicalset. Sets do notallow duplicate elements. 
- 
                    Name four methods every Java class will have.public String toString();public Object clone();public boolean equals();public int hashCode(); 
- 
                    Q: What is it object serialization ?Serialization is a way to convert objects (including complex data structures such as lists and trees) into a stream of bytes. 
- 
                    
- 
                    What interface must an object implement before it can be written to a streamas an objectAn object must implement the Serializable or Externalizable interface before it can bewritten to a stream asan object. 
- 
                    What classes of exceptions may be thrown by a throw statementA throw statement may throw any expression that may be assigned to the Throwabletype. 
- 
                    Under what conditions is an object's finalize() method invoked by the garbagecollectorThe garbage collector invokes an object's finalize() method when it detects that the objecthas becomeunreachable. 
- 
                    
- 
                    If a variable is declared as private, where may the variable be accessedA private variable may only be accessed within the class in which it is declared. 
- 
                    What is a compilation unitA compilation unit is a Java source code file. 
- 
                    Which package is always imported by defaultThe java.lang package is always imported by default. 
- 
                    How are the elements of a GridLayout organizedThe elements of a GridBad layout are of equal size and are laid out using the squares of agrid. 
- 
                    What event results from the clicking of a buttonThe ActionEvent event is generated as the result of the clicking of a button. 
- 
                    What are E and PIE is the base of the natural logarithm and PI is mathematical value pi. 
- 
                    What is the highest-level event class of the event-delegation modelThe java.util.EventObject class is the highest-level class in the event-delegation classhierarchy. 
- 
                    Is a class a subclass of itselfA class is a subclass of itself. 
Java Interview Questions

 
  
  
  
		
Ans