Java_2

Java_2

University

10 Qs

quiz-placeholder

Similar activities

Java History Characteristics Environment

Java History Characteristics Environment

University

12 Qs

Bài tập trắc nghiệm C++(tiếp)

Bài tập trắc nghiệm C++(tiếp)

3rd Grade - University

10 Qs

HTML Postest

HTML Postest

University

11 Qs

 QUIZ  MS Core Java Quiz-3 2023

QUIZ MS Core Java Quiz-3 2023

University

11 Qs

Computer Intro-Final Review 4

Computer Intro-Final Review 4

KG - University

10 Qs

QUIZ 7 PBO

QUIZ 7 PBO

University

10 Qs

python quiz

python quiz

6th Grade - Professional Development

10 Qs

Java Programming-1

Java Programming-1

University

10 Qs

Java_2

Java_2

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

lawrance r

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of an int in Java?

0.0

null

0

Undefined

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a primitive data type in Java?

float

boolean

String

char

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the size of a double data type in Java?

4 bytes

8 bytes

2 bytes

16 bytes

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to declare a constant variable in Java?

final

constant

static

var

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of 5 / 2 if both operands are integers?

2.5

2

3

Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if there is no else block after an if statement?

Compilation error

Program terminates

Only the if block executes if the condition is true

The next if block executes

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if a switch statement does not contain a break?

Compilation error

Only the matching case executes

Fall-through occurs (subsequent cases execute until a break)

None of the above

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