Search Header Logo

Java Programming Quiz

Authored by Niveditha N

Other

University

37 Questions

Used 1+ times

Java Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is not a Java keyword?

static

volatile

unsigned

native

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of Boolean in Java?

0

null

false

true

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many times will this loop run? for (int i = 0; i < 10; i++) { if (i == 5) break; }

10

5

4

Infinite

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What's the output of: int[] arr = new int[5]; System.out.println(arr[2]);

Error

Garbage

0

null

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method can return multiple values?

void

int[]

boolean

char

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is immutable in Java?

StringBuffer

StringBuilder

String

char[]

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is true about constructors?

Return type required

Called manually

No return type

Must be static

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?