Basic Java Quiz

Basic Java Quiz

University

15 Qs

quiz-placeholder

Similar activities

Java Básico

Java Básico

University

20 Qs

Java Arrays

Java Arrays

University

10 Qs

Java Coding Questions

Java Coding Questions

University

20 Qs

oops using java quiz

oops using java quiz

University

15 Qs

Quiz on Java

Quiz on Java

University

12 Qs

OOP Quiz

OOP Quiz

University

10 Qs

JAVA UNIT 1 PART 2

JAVA UNIT 1 PART 2

University

15 Qs

JAVA FINAL QUIZ FOR ASSESSMENT

JAVA FINAL QUIZ FOR ASSESSMENT

University

15 Qs

Basic Java Quiz

Basic Java Quiz

Assessment

Quiz

Computers

University

Medium

Created by

Stacey Do

Used 21+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?