الثلاثاء، 22 يناير 2013

MCQ of Java with answer set-2

الثلاثاء، 22 يناير 2013 - by mego almasry 0


1. The JDBC-ODBC bridge allows ……….. to be used as ………..
 A) JDBC drivers, ODBC drivers
B) Drivers, Application
C) ODBC drivers, JDBC drivers
D) Application, drivers

2. Which of the following is true about Java.
A) Java does not support overloading.
B) Java has replaced the destructor function of C++
C) There are no header files in Java.
D) All of the above.


3. ……………. are not machine instructions and therefore, Java interpreter generates machine code that can be directly executed by the machine that is running the Java program.
A) Compiled Instructions
B) Compiled code
C) byte code
D) Java mid code

4. The command javac
A) Converts a java program into binary code
B) Converts a java program into bytecode
C) Converts a java program into machine language
D) None of the above.

5. Which of the following is not the java primitive type
A) Byte
B) Float
C) Character
D) Long double

6. Command to execute compiled java program is
A) java
B) javac
C) run
D) javaw

7. Java Servlet
i) is key component of server side java development     
ii) is a small pluggable extension to a server that enhances functionality
iii) runs only in Windows Operating System
iv) allows developers to customize any java enabled server
A) i, ii & iii are ture
B) i, iii & iv are true
C) ii, iii & iv are true
D) i, ii & iv are true

8. Inner classes are
A) anonymous classes
B) nested classes
C) sub classes
D) derived classes

9. How many times does the following code segment execute
int x=1, y=10, z=1;
do{y--; x++; y-=2; y=z; z++} while (y>1 && z<10);
A) 1
B) 10
C) 5
D) infinite

10. State weather the following statement is true or false for EJB.
1. EJB exists in the middle-tier
2. EJB specifies an execution environment
3. EJB supports transaction processing
A) 1-true, 2. true, 3. true
B) 1- true, 2. false, 3. true
C) 1- false, 2- false, 3- false
D) 1-true, 2-true, 3-false

Answers:
1. C) ODBC drivers, JDBC drivers
2. D) All of the above.
3. C) byte code
4. B) Converts a java ....into bytecode
5. D) Long double
6. A) java
7. D) i, ii & iv are true
8. B) nested classes
9. A) 1
10. A) 1-true, 2. true, 3. true

You may also wanted to view the following related posts

For other more MCQs: Click Here

About the Author

Write admin description here..

0 التعليقات:

Text Widget

© 2013 12354584. WP Theme-junkie converted by Bloggertheme9