Java Programming Challenge

Java Programming Challenge

University

20 Qs

quiz-placeholder

Similar activities

Techwiz - ICL2.0 Quiz

Techwiz - ICL2.0 Quiz

University

20 Qs

Pelatihan 2 - BE - Bootcamp DCI

Pelatihan 2 - BE - Bootcamp DCI

University

20 Qs

Singly and Doubly Linked List Quiz

Singly and Doubly Linked List Quiz

University

17 Qs

Expression Evaluation Quiz

Expression Evaluation Quiz

University

20 Qs

Quiz for 3rd_sem

Quiz for 3rd_sem

University

25 Qs

Temel C Programlama Eğitimi

Temel C Programlama Eğitimi

University

20 Qs

Fundamentals of Control System

Fundamentals of Control System

University

20 Qs

Day-3 Assessment(Essentials of Data Analytics Using R)

Day-3 Assessment(Essentials of Data Analytics Using R)

University

15 Qs

Java Programming Challenge

Java Programming Challenge

Assessment

Quiz

Other

University

Medium

Created by

huyen vu

Used 2+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code: if (5 > 3) { System.out.println("True"); }?

Maybe

True

False

Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid if statement in Java?

if x > 0 { System.out.println("Positive"); }

if (x > 0) System.out.println("Positive");

if (x > 0) { System.out.println Positive; }

if (x > 0) { System.out.println("Positive"); }

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code: for (int i = 0; i < 3; i++) { System.out.print(i); }?

012

0123

00

123

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which loop will execute at least once?

for loop

do-while loop

foreach loop

while loop

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the expression 10 % 3?

1

10

0

3

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to compare two values in Java?

=

<>

== and .equals()

!=

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to declare a variable in Java?

var variableName int;

float variableName = 0;

string variableName;

int variableName;

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?