INTERVIEW-TECHNICAL PAPERS 

JAVA BASIC/ APTITUDE / ANALYTICAL

Main Index Java Basic-1 Java Basic-2 Java Basic 3 Java Basic-4 Java Basic-5

 



 




 


 Java Interview : Basis 
 
1.The Java interpreter is used for the execution of the source code.
a)True
b)False
Ans: a.
 

2) On successful compilation a file with the class extension is created.
a) True
b) False
Ans: a.
 

3) The Java source code can be created in a Notepad editor.
a) True
b) False
Ans: a.
 

4) The Java Program is enclosed in a class definition.
a) True
b) False
Ans: a.
 

5) What declarations are required for every Java application?
Ans: A class and the main( ) method declarations.

 
6) What are the two parts in executing a Java program and their purposes?
Ans: Two parts in executing a Java program are:
Java Compiler and Java Interpreter. The Java Compiler is used for compilation 
and the Java Interpreter is used for execution of the application.

 
7) What are the three OOPs principles and define them?
Ans : Encapsulation, Inheritance and Polymorphism are the three OOPs 
Principles.
Encapsulation: Is the Mechanism that binds together code and the 
data it manipulates, and keeps both safe from outside interference and misuse.
 
Inheritance: Is the process by which one object acquires the properties of 
another object.
 
Polymorphism: Is a feature that allows one interface to be used for a 
general class of actions.

8) What is a compilation unit?
Ans : Java source code file.
 
9) What output is displayed as the result of executing the following 
statement?
System.out.println("// Looks like a comment.");
// Looks like a comment 
The statement results in a compilation error  
Looks like a comment 
No output is displayed
Ans : a.
                                                      
                                                    Back to top
 
 

 

 

Google
 
Web www.hudihudi.com



   

Any suggestions/ads/comments/question paper submissions please email to submit (at) hudihudi.(dot)com

www.hudihudi.com

Copyright © www.hudihudi.com