wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Tech Linguist E-Quiz JAVA

Total questions: 25

Worksheet time: 16mins

Name
Class
Date
1.

which of the following is wrapper class in java

a)

Float

b)

Integer

c)

Double

d)

all of above

2.

which one of the following is true?

a)

runnable interface declares the start method

b)

Thread.start() method is used to move a thread from a new state to the runnable state

c)

Thread.runnable() method is used to move a thread from new state to the runnable state

d)

Thread.run() method is used to move a thread from new state to the runnable state

3.

Which one of the following statement is not true about the collection interface?

a)

all methods defined in set interface are also defined in collection interface

b)

list interface extends collection interface

c)

set interface extends collection interface

d)

all methods defined in list interface are also defined in collection interface

4.

which one of the following is a legal decelration of a two- dimensional array of integers

a)

int[] a[] = new int[5][];

b)

int[5][5] a = new int[][];

c)

int a = new int[5,5];

d)

int[][] a = new int[][5];

5.

which interface needs to be implemented in order to make an object seralized

a)

clonnable

b)

remote

c)

seralizable

d)

none of the above

6.

superclass of all classes representing the output stream of characters is -------------

a)

OutputStream

b)

Reader

c)

InputStream

d)

Writer

7.

which of this class is used by character streams for reading data from buffer

a)

BufferReader

b)

InputStreamReader

c)

FileReader

d)

FileInputStream

8.

which one this keywords are used to create a class in java

a)

class

b)

struct

c)

int

d)

none of the avove

9.

which one of these events will cause the thread to die?

a)

on calling the sleep() method.

b)

when the execution of the run() method ends

c)

when the execution of the start() method ends

d)

on calling the wait() method

10.

which one of the following have elements in insertion order

a)

sorted map

b)

hashmap

c)

linkedhashmap

d)

treemap

11.

Java was originally named:

a)

Coffee

b)

Oak

c)

New C++

d)

Duke

12.

Is Android based on Java?

a)

True

b)

False

13.

When was Java released?

a)

1975

b)

1985

c)

1995

d)

2005

e)

2015

14.
Which type of data is used to enter the value ("Welcome")?
a)
Text
b)
Characters
c)
String
d)
Boolean
15.
Which type of data is used to enter the value (1234.5)?
a)
Integer
b)
Double 
c)
Char
d)
Void
16.
Which type of data is used to enter the value (True)?
a)
Float
b)
Boolean
c)
Check box
d)
ٍString
17.

We use Scanner Library in java for...

a)

Give permissions to the user

b)

Correcting software errors

c)

Allows user to read data

d)

Allows the user to enter data

18.
When we want to print in Java, we use the code ......
a)
system.out.print();
b)
System.out.println();
c)
System.Out.Printf();
d)
System.out.show();
19.
What are the legal indexes for the array ar, given the following declaration:
int[] ar = {2, 4, 6, 8 }
a)
 0, 1, 2, 3
b)
 1, 2, 3, 4
c)
2, 4, 6, 8
d)
 0, 2, 4, 6
20.

For the array:

int stats[3];

What is the range of the index?

a)

0 to 3

b)

0 to 2

c)

1 to 3

d)

0 to 4

21.

float myFloatNum = 5.99f;

System.out.println(myFloatNum);


What will be the output?

a)

5.99

b)

5.99f

c)

"5.99"

d)

"5.99"f

22.

int sum1 = 100 + 50;

int sum2 = sum1 + 250;

int sum3 = sum2 + sum2;

System.out.println(sum3);


What will be the final output?

a)

950

b)

800

c)

sum2sum2

d)

sum1250

23.

What is the output of below code?


int x = 5;

System.out.println(x++);

System.out.println(x);

a)

5

5

b)

6

6

c)

5

6

d)

6

5

24.

Class Cat extends Animal. Which is NOT a valid declaration?

a)

Cat x = new Cat();

b)

Animal X = new Animal();

c)

Cat x = new Animal();

d)

Animal x = new Cat();

25.

Fix the syntax error in Line 8.

a)

Cylinder sc = new System.in( );

b)

Scanner sc = new Scanner (System.in);

c)

Cylinder Volume = new Volume( );

d)

Cylinder call = new Cylinder( );