wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

oops using java quiz

Total questions: 15

Worksheet time: 11mins

Name
Class
Date
1.

Identify the person

a)

Dennis Ritchie

b)

James Gosling

c)

Charles Babbage

d)

Alan Turin

2.

Draw the class diagram of Student class with id, name, marks attributes

3.

(a)   binds data and functions together

4.

Java was originally named:

a)

Coffee

b)

Oak

c)

New C++

d)

Duke

5.

What is the name of the Java mascot?

a)

Duke

b)

Ronny

c)

Penguin

d)

James

e)

Jack

6.

Which company owns Java?

a)

Oracle

b)

Microsoft

c)

Google

d)

Apple

e)

Intel

7.

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];

8.

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

9.

which of the following is wrapper class in java

a)

Float

b)

Integer

c)

Double

d)

all of above

10.

Which method is used to make main thread to wait for all child threads

a)

Join ()

b)

Sleep ()

c)

Wait ()

d)

Stop ()

11.

In JAVA multi threading, a thread can be created by_______

a)

Extending class

b)

Implementing Runnable Interface

c)

both

d)

none

12.

Which of this command has errors? Select multiple

a)

System.out.print("Hello World")

b)

System.out.print(Hello World);

c)

System.out.Print("Hello World);

d)

System.out.print("Hello World");

13.

Which of the followings is Java code that starts from the main() method as a mandatory part of every program

a)

public void static main(String args [])

b)

public void main static (args[] String)

c)

public static void main (String args[])

d)

public static void main [String [] Args]

14.

Which of this command has errors? Select multiple

a)

System.out.print("Hello World")

b)

System.out.print(Hello World);

c)

System.out.Print("Hello World);

d)

System.out.print("Hello World");

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