- 
                    What is the difference between a while statement and a do statementA 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. 
- 
                    When does the compiler supply a default constructor for a classThe compiler supplies a default constructor for a class if no other constructors areprovided. 
- 
                    If a method is declared as protected, where may the method be accessedA protected method may only be accessed by classes or interfaces of the same package orby subclasses of the class in which it is declared. 
- 
                    What is the return type of a program's main() methodA program's main() method has a void return type. 
- 
                    How is it possible for two String objects with identical values not to be equalunder the == operatorThe == operator compares two objects to determine if they are the same object inmemory. It is possible for two String objects to have the same value, but locatedindifferent areas of memory. 
- 
                    What are the legal operands of the instanceof operatorThe left operand is an object reference or null value and the right operand is a class,interface, or array type. 
- 
                    Are true and false keywordsThe values true and false are not keywords. 
- 
                    What happens when you add a double value to a StringThe result is a String object. 
- 
                    How can a dead thread be restartedA dead thread cannot be restarted. 
- 
                    
- 
                    
- 
                    
- 
                    
- 
                    
- 
                    
- 
                    
- 
                    
- 
                    
- 
                    
- 
                    
Java Interview Questions

 
  
  
  
		
Ans