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

 

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.

 

……………. 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

 

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.

 

Which of the following is not the java primitive type

A) Byte

B) Float

C) Character

D) Long double

 

Command to execute compiled java program is

A) java

B) javac

C) run

D) javaw

 

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

 

Inner classes are

A) anonymous classes

B) nested classes

C) sub classes

D) derived classes

 

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

 

State weather the following statement is true or false for EJB.

EJB exists in the middle-tier

EJB specifies an execution environment

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

 

Click here to download PDF MCQ of Java – 2

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
Advertisements