wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

java

Total questions: 19

Worksheet time: 11mins

Name
Class
Date
1.

_________ operator returns the remainder after division

a)

+

b)

/

c)

%

d)

*

2.

What is JVM ?

a)

JVM is the confined memory area

b)

All java programs run inside JVM memory

c)

JVM provides security to the computer by giving controlled access to Files and Memory on a computer

d)

All the above

3.

What are the main Distribution types of Java Software?

a)

Java SE (Java Standard Edition)

b)

Java EE (Java Enterprise Edition)

c)

Java ME (Java Micro Edition)

d)

All the above

4.

Which of the following for loop declaration is not valid?

a)

for ( int i = 99; i >= 0; i / 9 )

b)

for ( int i = 7; i <= 77; i += 7 )

c)

for ( int i = 20; i >= 2; - -i )

d)

for ( int i = 2; i <= 20; i = 2* i )

5.

Evaluate the following Java expression, if x=3, y=5, and z=10:

++z + y - y + z + x++

a)

24

b)

23

c)

20

d)

25

6.

What is the value stored in x in following lines of code?

int x, y, z;

 x = 0;

 y = 1;

 x = y = z = 8;

a)

1

b)

9

c)

8

d)

0

7.

Which of these are selection statements in Java?

a)

break

b)

continue

c)

for()

d)

if()

8.

Which of the following is not an OOPS concept in Java?

a)

Polymorphism

b)

Compilation

c)

Inheritance

d)

Encapsulation

9.

Which component is used to compile, debug and execute the java programs?

a)

JRE

b)

JIT

c)

JDK

d)

JVM

10.

Which of these cannot be used for a variable name in Java?

a)

identifier & keyword

b)

identifier

c)

keyword

d)

none of the mentioned

11.

Java is

a)

Machine dependent language

b)

Machine independent language

12.

JRE stands for

a)

Java Run Environment

b)

Java Run Execution

c)

Java Runtime Environment

d)

Java Ready Execution

13.

JDK stands for

a)

Java Developer Kit

b)

Java Development Kit

c)

Java Design Kit

d)

Java Debugging Kit

14.

Command to run a Java program

a)

javaa

b)

java

c)

jaava

d)

jaavaa

15.

Command to compile Java program

a)

javax

b)

javay

c)

javac

d)

Java

16.

A ___________ file is created after successful compilation of a Java program.

a)

Object file

b)

Array file

c)

Class file

d)

String file

17.

Java program does not run without below function

a)

user()

b)

system()

c)

main()

d)

void()

18.

Java program is

a)

Interpreted

b)

Compiled

19.

The name of the following should be the file name in Java

a)

Object Name

b)

Variable Nam

c)

Class Name

d)

Array Name