wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

JAVA Round 1

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

Which of the following is used to print output in Java?

a)

cout

b)

print()

c)

System.out.println()

d)

echo

2.

Which keyword is used to create a class in Java?

a)

class

b)

define

c)

struct

d)

object

3.

Which data type is used to store whole numbers?

a)

float

b)

double

c)

int

d)

char

4.

Which method is the entry point of Java program?

a)

start()

b)

main()

c)

run()

d)

init()

5.

Which symbol is used to end a statement in Java?

a)

:

b)

;

c)

,

d)

.

6.

Which of the following is not a Java keyword?

a)

static

b)

void

c)

public

d)

include

7.

Which operator is used for addition?

a)

*

b)

+

c)

-

d)

/

8.

Which package contains Scanner class?

a)

java.io

b)

java.lang

c)

java.util

d)

java.net

9.

Which keyword is used to inherit a class?

a)

implement

b)

inherit

c)

extends

d)

super

10.

Which loop executes at least once?

a)

for

b)

while

c)

do-while

d)

if

11.

Which data type stores true or false?

a)

int

b)

boolean

c)

char

d)

float

12.

Which keyword is used to create an object?

a)

new

b)

create

c)

make

d)

object

13.

Which of the following is used to take input from user?

a)

BufferedReader

b)

Scanner

c)

InputStream

d)

All of the above

14.

Which access modifier allows access everywhere?

a)

private

b)

protected

c)

default

d)

public

15.

Which operator compares two values?

a)

=

b)

==

c)

++

d)

!=

16.

Which class is the parent of all Java classes?

a)

Main

b)

Object

c)

System

d)

String

17.

Which keyword stops a loop?

a)

stop

b)

break

c)

exit

d)

return

18.

Which array index starts in Java?

a)

0

b)

1

c)

-1

19.

Which of these is a wrapper class?

a)

int

b)

float

c)

Integer

d)

char

20.

Which of these is not an OOP concept?

a)

Inheritance

b)

Polymorphism

c)

Compilation

d)

Encapsulation

21.

Which keyword is used to make a constant?

a)

static

b)

final

c)

const

d)

fixed

22.

Which collection does not allow duplicate values?

a)

List

b)

Set

c)

ArrayList

d)

Vector

23.

Which operator is used for logical AND?

a)

&

b)

&&

c)

||

d)

!

24.

Which Java feature allows method overriding?

a)

Abstraction

b)

Polymorphism

c)

Inheritance

d)

Encapsulation

25.

Which JVM component loads classes?

a)

Interpreter

b)

Compiler

c)

Class Loader

d)

Garbage Collector