Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Java JVM JDK

Total questions: 42

Worksheet time: 21mins

Name
Class
Date
1.

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

a)

JVM

b)

JDK

c)

JRE

d)

JIT

2.

Which component is responsible for converting bytecode into machine specific code

a)

JVM

b)

JDK

c)

JRE

d)

JIT

3.

Which component is responsible to run java program

a)

JVM

b)

JDK

c)

JRE

d)

JIT

4.

What is the extension of compiled java classes

a)

.classs

b)

.java

c)

.txt

d)

.js

5.

What is use of interpreter

a)

They convert bytecode to machine language code

b)

They read high level code and execute them

c)

They are intermediated between JIT and JVM

d)

It is a synonym for JIT

6.

Which of the following option leads to the portability and security of Java?

a)

Bytecode is executed by JVM

b)

The applet makes the Java code secure and portable

c)

Use of exception handling

d)

Dynamic binding between objects

7.

Which of the following is not a Java features?

a)

Dynamic

b)

Architecture Neutral

c)

Use of pointers

d)

Object-oriented

8.

_____ is used to find and fix bugs in the Java programs.

a)

JVM

b)

JRE

c)

JDK

d)

JDB

9.

Which of the following tool is used to generate API documentation in HTML format from doc comments in source code?

a)

javap tool

b)

javaw command

c)

Javadoc tool

d)

javah command

10.

Java is ______________________

a)

Object based

b)

Object Oriented

c)

fully object oriented

d)

procedural

11.

Java was developed by

a)

James gosling

b)

John gosling

c)

James frank

d)

John frank

12.

JDK stands for (a)  

13.

JVM stands for (a)  

14.

List out oops concept.

4 lines
15.

Int data types represents _______ bits.

a)

8

b)

16

c)

32

d)

64

16.

There are (a)   types of data types.

17.

(a)   is a piece of memory that can contain a data value.

18.

How many types of array?

a)

1

b)

2

c)

3

d)

4

19.

List out types of inheritance.

a)

Single

b)

Mulitple

c)

Multi level

d)

Hierarchy

20.

Which one of the following is escape sequences?

a)

\r

b)

\n

c)

\f

d)

\t

21.

Which is the portability and security cause in Java?


a)

The applet makes the Java code secure and portable

b)

Bytecode is executed by JVM

c)

handling Dynamic binding between objects

d)

Use of exception

22.

Which of the following is not a Java features?

a)

Dynamic

b)

Architecture Neutral

c)

Object-oriented

d)

Use of pointers

23.

Which component is responsible to run java program?

a)

JVM

b)

JDK

c)

JIT

d)

JRE

24.

What is the extension of java code files?

a)

.class

b)

.txt

c)

.java

d)

.js

25.

Converting real world objects in terms of class in java?

a)

Polymorphism

b)

Encapsulation

c)

Abstraction

d)

Inheritance

26.

1. class main_class

2. {

3. public static void main(String args[])

4. {

5. int y = 10;

6. if (y == 10)

7. {

8. int y = 11;

9. System.out.println(y);

10. }

11. }

12. }

a)

Compilation error

b)

10

c)

11

d)

Run time error

27.

class KIET_Test {

int x;

}

class Main {

public static void main(String args[]) {

KIET_Test t = new KIET_Test();

System.out.println(t.x);

}

}

a)

garbage value

b)

0

c)

compiler error

d)

runtime error

28.

Which of the following is a valid declaration of an object of class Box?

a)

Box obj = new Box;

b)

Box obj = new Box();

c)

obj = new Box();

d)

new Box obj;

29.

Which of these operators is used to allocate memory for an object?

a)

malloc

b)

alloc

c)

new

d)

this

30.

Which of the below is/are valid identifier with the main method?

a)

public

b)

private

c)

static

d)

this

31.

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

a)

JVM

b)

JDK

c)

JIT

d)

JRE

32.

Which component is responsible for converting bytecode into machine specific code?

a)

JVM

b)

JDK

c)

JIT

d)

JRE

33.

Which component is responsible to run java program?

a)

JRE

b)

JVM

c)

JIT

d)

JDK

34.

Which component is responsible to optimize bytecode to machine code?

a)

JRE

b)

JVM

c)

JDK

d)

JIT

35.

Which statement is true about java?

a)

Sequence dependent programming language

b)

Code dependent programming language

c)

Platform independent programming language

d)

Platform dependent programming language

36.

JVM is _____

a)

code dependent

b)

code independent

c)

platform dependent

d)

platform independent

37.

What is the extension of compiled java classes?

a)

.class

b)

.js

c)

.txt

d)

.java

38.

Which of the following option leads to the portability and security of Java?

a)

The applet makes the Java code secure and portable

b)

Use of exception handling

c)

Dynamic binding between objects

d)

Bytecode is executed by JVM

39.

Which of the following is not a Java features?

a)

Architecture Neutral

b)

Dynamic

c)

Use of pointers

d)

Object-oriented

40.

In which memory a String is stored, when we create a string using new operator?

a)

Stack

b)

String memory

c)

Random storage space

d)

Heap memory

41.

correct execution process in Java

a)

load->edit->compile->verify->execute

b)

edit->load->compile->execute->verify

c)

edit->compile->load->verify->execute

d)

verify->edit->compile->load->execute

42.

JVM full form___

a)

Java Visual Model

b)

Java Virtual Model

c)

Java Visual Machine

d)

Java Virtual Machine