Java1 - Week2

Java1 - Week2

University

•

25 Qs

quiz-placeholder

Similar activities

Principal of marketing chapter 2

Principal of marketing chapter 2

University

•

20 Qs

15th Anniversary KIME FE UNNES

15th Anniversary KIME FE UNNES

University

•

20 Qs

GRizal Review

GRizal Review

University

•

20 Qs

AWT - Kapitel 1

AWT - Kapitel 1

University

•

23 Qs

Ultimate office trivia quiz

Ultimate office trivia quiz

KG - Professional Development

•

25 Qs

Songs & Song Artists

Songs & Song Artists

3rd Grade - Professional Development

•

20 Qs

EMBEDDED SYSTEM DESIGN

EMBEDDED SYSTEM DESIGN

University

•

20 Qs

BEEE Pre-test Assessment

BEEE Pre-test Assessment

University

•

20 Qs

Java1 - Week2

Java1 - Week2

Assessment

Quiz

•

Other

•

University

•

Practice Problem

•

Hard

Created by

Yahini Prabha Murugesan

Used 11+ times

FREE Resource

AI

Enhance your content in a minute

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

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What's the value of the below?

boolean b = (5 > 2);

True

False

5

2

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What's the value of the below?

score = 75;


if (score >= 90.0)

System.out.print("A");

else if (score >= 80.0)

System.out.print("B");

else if (score >= 70.0)

System.out.print("C");

else if (score >= 60.0)

System.out.print("D");

else

System.out.print("F");

A

B

C

D

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What's the value of below?


int Status =2;


switch (status) {

case 0: System.out.println(0);

break;

case 1: System.out.println(1);

break;

case 2: System.out.println(2);

case 3: System.out.println(3);

break;

default: System.out.println("Invalid");

System.exit(1);

}

2

3

2

3

2

3

Invalid

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What's the value of the below?


int x = 10;

y = (x > 15) ? 1 : -1;

System.out.println(y);

10

15

-1

1

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What's the output of the below?


int num = 11;


if (num % 2 == 0)

System.out.println("If is the right answer");

else

System.out.println("Else is the right answer”);

If is the right answer

Else is the right answer

Runtime Error

Compiler Error

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What's the value of the below?

score = 55;


if (score >= 50.0)

System.out.print("PASS");

else

System.out.print("FAIL");

PASS

FAIL

PASS FAIL

55

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What's the value of below?


int Status =20;


switch (status) {

case 0: System.out.println(0);

break;

case 1: System.out.println(1);

break;

case 2: System.out.println(2);

break;

case 3: System.out.println(3);

break;

default: System.out.println("Invalid");

System.exit(1);

}

2

3

2

3

2

3

Invalid

Invalid

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?