Type Here to Get Search Results !

Java MCQs ( Multiple Choice Questions ) with Answers - Set I

0

 Java MCQ's  with Answers

set I


Q1. Java has its origin in

a) C programming language

b) PERRL

c) COBOL

d) Oak programming language

Answer is d) Oak programming language
Explanation :
For explanation Join the discussion below

 

Q2. Java programs are

a) Faster than others

b) Platform independent

c) Not reusable

d) Not scalable

Answer is b) Platform independent
Explanation :
For explanation Join the discussion below

 

Q3. Which one of the following is true for Java

a) Java is object-oriented and interpreted

b) Java is efficient and faster than C

c) Java is the choice of everyone.

d) Java is not robust.

Answer is a) Java is object-oriented and interpreted
Explanation :
For explanation Join the discussion below

 

Q4. Java servlets are an efficient and powerful solution for creating _________ for the web.

a) Dynamic content

b) Static content

c) Hardware

d) Both a and b

Answer is a) Dynamic content
Explanation :
For explanation Join the discussion below

 

Q5. The command javac is used to

a) debug a java program

b) compile a java program

c) interpret a java program

d) execute a java program

Answer is b) compile a java program
Explanation :
For explanation Join the discussion below

 

Q6. Which of the following is not a Java features?

a) Dynamic

b) Architecture Neutral

c) Object-oriented

d) Use of pointers

Answer is d) Use of pointers
Explanation :
For explanation Join the discussion below

 

Q7. Which of the following option leads to the portability and security of Java?

a) Bytecode is executed by JVM

b) The applet makes the Java code secure and portable

c) Use of exception handling

d) Dynamic binding between objects

Answer is a) Bytecode is executed by JVM
Explanation :
For explanation Join the discussion below

 

Q8. Native-protocol pure Java converts _________ into the _________ used by DBMSs directly.

a) JDBC calls, network protocol

b) ODBC class, network protocol

c) ODBC class, user call

d) JDBC calls, user call

Answer is a) JDBC calls, network protocol
Explanation :
For explanation Join the discussion below

 

Q9. Which is the root class of all AWT events

a) java.awt.ActionEvent

b) java.awt.AWTEvent

c) java.awt.event.AWTEvent

d) java.awt.event.Event

Answer is b) java.awt.AWTEvent
Explanation :
For explanation Join the discussion below

 

Q10. OOP features are
i) Increasing productivity ii) Reusability
iii) Decreasing maintenance cost iv) High vulnerability

a) i,ii & iv

b) i,ii & iii

c) i, ii & iv

d) none of the above

Answer is b) i,ii & iii
Explanation :
For explanation Join the discussion below

 

Q11. _________ is used to find and fix bugs in the Java programs.

a) JVM

b) JDK

c) JDB

d) JRE

Answer is c) JDB
Explanation :
For explanation Join the discussion below

 

Q12. Filters were officially introduced in the Servlet _________ specification.

a) 2.1

b) 2.3

c) 2.2

d) 2.4

Answer is b) 2.3
Explanation :
For explanation Join the discussion below

 

Q13. break statement is used to
i) get out of method ii) end a program
iii) get out of a loop iv) get out of the system

a) i & ii

b) i,ii & iv

c) i & iii

d) iii

Ans is d) iii
Explanation :
For explanation Join the discussion below

 

Q14. Evaluate the following Java expression, if x=3, y=5, and z=10:
++z + y - y + z + x++

a) 24

b) 25

c) 20

d) 23

Ans is a) 24
Explanation :
For explanation Join the discussion below

 

Q15. Which package contains the Random class?

a) java.util package

b) java.lang package

c) java.awt package

d) java.io package

Ans is a) java.util package
Explanation :
For explanation Join the discussion below

 




Post a Comment

0 Comments

Top Post Ad

Below Post Ad