Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Java Diagnostic Assessment

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is Java primarily used for?

a)

Game development

b)

Web development

c)

Mobile applications

d)

All of the above

2.

Who developed the Java programming language?

a)

Microsoft

b)

Oracle Corporation

c)

Sun Microsystems

d)

Google

3.

Which of the following is not a feature of Java?

a)

Platform independence

b)

Object-oriented

c)

Machine-dependent

d)

Secure

4.

What is the file extension for a compiled Java file?

a)

.java

b)

.exe

c)

.class

d)

.py

5.

Which of these is the correct syntax for the main method in Java?

a)

public static void main(String args[])

b)

public void main(String args[])

c)

static public void main(String args[])

d)

Both a and c

6.

What does JVM stand for?

a)

Java Virtual Machine

b)

Java Version Manager

c)

Java Visual Model

d)

Java Virtual Module

7.

What is bytecode in Java?

a)

A compiled Java code that can run on any platform

b)

A machine-level code for the operating system

c)

A runtime error code

d)

A debugging tool

8.

Which of the following is a valid Java variable name?

a)

1variable

b)

$myVariable

c)

my-variable

d)

int

9.

How do you write a single-line comment in Java?

a)

/* comment */

b)

// comment

c)

# comment

d)
10.

Which keyword is used to create a class in Java?

a)

class

b)

new

c)

import

d)

public