Basic Java Quiz

Basic Java Quiz

University

15 Qs

quiz-placeholder

Similar activities

Java Arrays

Java Arrays

University

10 Qs

Java Displaying Data & Data Types

Java Displaying Data & Data Types

University - Professional Development

12 Qs

JAVA Basics Quiz

JAVA Basics Quiz

University

20 Qs

Quiz on Java

Quiz on Java

University

12 Qs

Java

Java

University

15 Qs

Java Coding Questions

Java Coding Questions

University

20 Qs

JAVA - Arrays

JAVA - Arrays

University - Professional Development

15 Qs

oops using java quiz

oops using java quiz

University

15 Qs

Basic Java Quiz

Basic Java Quiz

Assessment

Quiz

Computers

University

Medium

Created by

Stacey Do

Used 18+ 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?