wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

A dig into Java Virtual Machine (JVM)

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is a virtual machine?

a)

A program that takes abstract Assembly code, compile into machine code, and run it on host machine

b)

A program that takes a source code from a high-level language and compile it to abstract Assembly code

c)

A program that takes a source code from a high-level language and convert to another at same level-abstraction

d)

A program that takes abstract Assembly code, convert it to a source code of a high-level language

2.

Which of following programming languages does not run on a VM?

a)

Java

b)

F#

c)

Rust

d)

C#

3.

What’s the actual name of JavaScript intermediate language?

a)

Bytecode

b)

Opcode

c)

Common Intermediate Language (CIL)

d)

Assembly

4.

What is Oracle-defined-name of “javap”?

a)

Java Class File Disassembler

b)

Java Print

c)

Java Compiler

d)

Java Bytecode Viewer

5.

How much space can a line of bytecode takes up to?

a)

8 bits (1 byte)

b)

16 bits (2 bytes)

c)

24 bits (3 bytes)

d)

32 bits (4 bytes)

6.

How many slots does a “long” variable need in Stack and Constant Pool?

a)

1 slot, 32 bits, 4 bytes

b)

2 slots, 64 bits, 8 bytes

c)

3 slots, 96 bits, 12 bytes

d)

4 slots, 128 bits, 16 bytes

7.

Which component of the JVM responsible to verify class files?

a)

Class Loader

b)

Memory Area

c)

Execution Engine

d)

Metaspace

8.

Which of following is not part of the Stack Frame?

a)

Local Variables

b)

Operand Stack

c)

Frame Data

d)

Metaspace

9.

Which of the following opcode is not defined in JavaSE specification?

a)

iconst_3

b)

istore_2

c)

iload_1

d)

iconst_7

10.

Which opcode performs a method call on object that implementation is known at run time?

a)

invokeinterface

b)

invokespecial

c)

invokevirtual

d)

invokestatic