wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Collections, JDBC/RDBMS

Total questions: 10

Worksheet time: 13mins

Name
Class
Date
1.

Predict the output:

a)

Compiletime Error at line 6

b)

Compiletime Error at line 7 : Unhandled IOException

c)

accepts string and displays on the screen

d)

None of the above

2.

Predict the output:

a)

Compile time error

b)

Run time error

c)

Java

Unix

d)

Java

Unix

Oracle

C++

Perl

3.

Predict the output:

a)

Hello from Parent

b)

Hello from Child

c)

Compilation Error

d)

None of the above

4.

Predict the output:

a)

Compile Time Error : Array size is negative

b)

Runtime Exception : Array size is negative

c)

0

d)

-0

5.

Predict the output

a)

Kucu Kucu

b)

I speak

c)

compile time error

d)

runtime exception

6.

Predict the output:

a)

Java

PJP

b)

Compile time error

c)

Runtime Exception : IndexOutOfBoundsException

d)

None of the above

7.

Predict the output:

a)

10

11

b)

10

10

c)

11

11

d)

11

10

8.

What is the return type of setter method?

a)

void

b)

It depends on the instance variable's data type whose value we are trying to retrieve.

9.

Which of the below options is correct to load the Oracle JDBC driver?

a)

Class.forName("oracle.jdbc.driver.OracleDBDriver");

b)

Class.forName("Oracle.Jdbc.Driver.OracleDriver");

c)

Class.forName("jdbc.oracle.driver.OracleDriver");

d)

Class.forName("oracle.jdbc.driver.OracleDriver");

10.

Which of the below queries is correct to display the Employee details such as empno, ename, sal from emp table whose empno contains 77 in it?

a)

select empno,ename,sal from emp where empno is 77;

b)

select empno,ename,sal from emp where empno like '_77%';

c)

select empno,ename,sal from emp where empno like '%77%';

d)

select empno,ename,sal from emp where empno like '_77_';