Java_2

Java_2

University

10 Qs

quiz-placeholder

Similar activities

Information and communication technology

Information and communication technology

University

10 Qs

CIS18A Quiz 1 Review Game

CIS18A Quiz 1 Review Game

University

15 Qs

TEMA 3 CAPA DE TRANSPORTE __

TEMA 3 CAPA DE TRANSPORTE __

University

12 Qs

Java Unit 1

Java Unit 1

University

10 Qs

Information Coding Scheme

Information Coding Scheme

1st Grade - University

10 Qs

L10 OS LAB WS24 14-2-24

L10 OS LAB WS24 14-2-24

University

13 Qs

Calculating Storage Requirements

Calculating Storage Requirements

8th Grade - University

8 Qs

JAVA-BootCamp - Day1

JAVA-BootCamp - Day1

University

15 Qs

Java_2

Java_2

Assessment

Quiz

Computers

University

Hard

Created by

lawrance r

Used 1+ times

FREE Resource

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

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?