wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Java Programming Quiz

Total questions: 10

Worksheet time: 10mins

Name
Class
Date
1.

Who invented Java Programming?

a)

Guido van Rossum

b)

James Gosling

c)

Dennis Ritchie

d)

Bjarne Stroustrup

2.

Which statement is true about Java?

a)

Java is a sequence-dependent programming language

b)

Java is a code dependent programming language

c)

Java is a platform-dependent programming language

d)

Java is a platform-independent programming language

3.

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

a)

a) jdk

b)

b)jvm

c)

c)jre

d)

d)jit

4.

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

identifier & keyword
b) identifier
c) keyword
d) none of the mentioned

a)

a)identifier & keyword

b)

b) identifier

c)

c) keyword

d)

d) none of the mentioned

5.

What is the default value of a boolean variable in Java?

a)

d) null

b)

c) 0

c)

b) false

d)

a) true

6.

Which of the following is not a valid Java identifier?

a)

d) myVariable

b)

c) 1stVariable

c)

b) $myVariable

d)

a) _myVariable

7.

Which keyword is used to create a subclass in Java?

a)

d) super

b)

a) extends

c)

b) implements

d)

c) inherits

8.

What is the main purpose of the Java Virtual Machine (JVM)?

a)

a) To compile Java code

b)

b) To execute Java bytecode

c)

c) To provide a graphical user interface

d)

d) To manage memory allocation

9.

Which of the following is a feature of Java?

a)

a) Automatic memory management

b)

d) Pointers

c)

b) Multiple inheritance through classes

d)

c) Operator overloading

10.

What is the size of an int variable in Java?

a)

a) 8 bits

b)

b) 16 bits

c)

c) 32 bits

d)

d) 64 bits