wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

OOPS Live Quiz

Total questions: 28

Worksheet time: 14mins

Name
Class
Date
1.

Odd man out.

a)

peek

b)

element

c)

top

2.

We can create object for interface.

a)

TRUE

b)

FALSE

3.

A class can implement interface having same method name but different return type.

a)

Yes

b)

No

4.

Which of these class is superclass of String and StringBuffer class?

a)

java.Lang

b)

java.lang

c)

java.util

d)

ArrayList

5.

Which of the following events are not there in java fx?

a)

Mouse Event

b)

Keyboard Event

c)

Drag Event

d)

None of these

6.

Which package contains Date/Time?

a)

java.timedate

b)

java.util.time

c)

java.time

d)

java.util.calender

7.

Match the following

octal (base 8) ---- 0b10010; (1)

hexadecimal (base 16) ---- 0x2F; (2)

binary (base 2) ---- 027; (3)

a)

Octal - 3

Hexadecimal - 2

Binary - 1

b)

Octal - 1

Hexadecimal - 3

Binary - 2

c)

Octal - 3

Hexadecimal - 1

Binary - 2

d)

Octal - 2

Hexadecimal - 3

Binary - 1

8.

Which of these method of class String is used to extract a single character from a String object?

a)

CHARAT()

b)

charat()

c)

charAt()

d)

Charat()

9.

A class can implement how many interfaces.

a)

1

b)

2

c)

Many

d)

100

10.

Which of these method of class String is used to compare two String objects for their equality?

a)

equals()

b)

Equals()

c)

isequal()

d)

isEqual()

11.

Byte stream class uses read and write methods

a)

True

b)

False

12.

String buffer doesn't support

a)

Modifiable

b)

Immutable

c)

Growable

d)

Writeable

13.

Any 4 inbuilt exception examples

a)

I know the answer

b)

I don't know the answer

14.

interface Color{

void car();

}

interface Model{

void name();

}

class A7 implements Color,Model{

public void car(){

System.out.println("Car");

}

public void name(){

System.out.println("Name");

}

public static void main(String args[]){

A7 obj= __________

obj.car();

obj.name();

} }

How do create an object?

a)

I know the answer

b)

I don't know the answer

15.

What are the 4 access modifier in JAVA?

a)

I know the answer

b)

I don't know the answer

16.

Example of Hierarchical Inheritance.

a)

I know the answer

b)

I don't know the answer

17.

Difference between 'Thread' and 'Runnable'

a)

I know the answer

b)

I don't know the answer

18.

What is the difference between element() and peek() methods of queue?

a)

I know the answer

b)

I don't know the answer

19.

Stack <Integer> stk=new Stack<>();

stk.push(7);

stk.push(8);

stk.push(11);

How will you find out the position of number '8' in stack?

a)

I know the answer

b)

I don't know the answer

20.

What are the different ways to access the package?

a)

I know the answer

b)

I don't know the answer

21.

How are ‘this’ keyword used in JAVA? (Any 2)

a)

I know the answer

b)

I don't know the answer

22.

What are all the objects of print stream?

a)

I know the answer

b)

I don't know the answer

23.

What are the two ways 'synchronized' keyword can be used in thread?

a)

I know the answer

b)

I don't know the answer

24.

When you create an input stream, if the file does not exist, then which exception is thrown

a)

I know the answer

b)

I don't know the answer

25.

Explain hasNext() method.

a)

I know the answer

b)

I don't know the answer

26.

Name 3 classes provided by  javafx.scene.layout Package

a)

I know the answer

b)

I don't know the answer

27.

interface Drawable{

void draw();

}

class R implements Drawable{

public void draw(){

System.out.println("Rectangle");

} }

class C implements Drawable{

public void draw(){

System.out.println("Circle");

} }

class Test{

public static void main(String args[]){

Drawable d= ____________

d.draw();

} }

How will you create an object for class 'C'?

a)

I know the answer

b)

I don't know the answer

28.

Type casting from smaller type to larger type can be converted automatically.

True/ False.

If true,specify the type of casting.

a)

I know the answer

b)

I don't know the answer