الأحد، 9 يونيو 2013

Java MCQ Questions and Answers set-5

1. Preparedstatement Object in JDBC is used to execute ........................... queries.
A) executable
B) simple
C) high level
D) parameterized

2. In JDBC ........................ imports all Java classes concerned with database connectivity.
A) javax.sql.*
B) java.mysql.*
C) java.sql.*
D) com.*

3. MS-SQL stores data in a ........................ file format.
A) .DAT
B) .MDB
C) .MSSQL
D) .OBJ

4. Ingres is a ........................
A) Socket
B) Compiler
C) Database
D) Web server

5. In Java servlet method init( ) is called ..................... times.
A) 1
B) 2
C) 0
D) multiple

6. State true or false for Java Program.
i) All class variables are instance variables
ii) All protected methods are friendly methods
A) i-false, ii-false
B) i-false, ii-true
C) i-true, ii-false
D) i-true, ii-true

7. State true or false for Java Program.
i) Data members of an interface are by default final
ii) An abstract class has implementations of all methods defined inside it.
A) i-false, ii-false
B) i-false, ii-true
C) i-true, ii-false
D) i-true, ii-true

8. ........................ of a remotely accessible object must implement ................
A) all methods, RemoteException
B) class, RemoteException
C) class, RemoteInterface
D) all methods, RemoteInterface

9. ......................is the key to ........................
A) Serialization, persistence
B) Persistence, inheritance
C) Inheritance, object
D) Persistence, serialization

10. A method name myMethod( ) that needs two integer arguments is declared as
A) public void myMethod( );
B) public void myMethod(int a, int b);
C) public void myMethod(int a, b);
D) public int myMethod(a, b);


Answers:

1.  D) parameterized
2.  C) java.sql.*
3.  A) .DAT
4.  C) Database
5.  A) 1
6.  B) i-false, ii-true
7.  C) i-true, ii-false
8.  C) class, RemoteInterface
9.  A) Serialization, persistence
10.B) public void myMethod(int a, int b);

You Might also view the following Related Posts

ليست هناك تعليقات:

إرسال تعليق