Search Header Logo

Basic Java Quiz

Authored by Stacey Do

Computers

University

Used 23+ times

Basic Java Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What type of language is Java?

Object Oriented

Scripting

Assembly

Pseudocode

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of an int variable in Java?

0

1

null

-1

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to create an object in Java?

create

object

new

make

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the correct way to declare a variable of type double in Java?

double variableName

boolean variableName

String variableName

int variableName

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the output of the following code? int x = 5; System.out.println(x++);

6

null

5

4

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the output of the following code? String str = "Java"; System.out.println(str.length());

6

3

5

4

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the output of the following code? System.out.println(10 > 5 && 5 < 3);

5

true

false

10

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers