Java Programming Quiz 10.14

Java Programming Quiz 10.14

9th - 12th Grade

•

33 Qs

quiz-placeholder

Similar activities

تدريب إثرائي_2_عاشر

تدريب إثرائي_2_عاشر

10th Grade

•

28 Qs

Komputer dan Jaringan Dasar

Komputer dan Jaringan Dasar

10th Grade

•

30 Qs

Examen Lección 1-4 E-thinking

Examen Lección 1-4 E-thinking

12th Grade

•

34 Qs

Bài kiểm tra cuối kì

Bài kiểm tra cuối kì

9th - 12th Grade

•

30 Qs

ULANGAN HARIAN INFORMATIKA

ULANGAN HARIAN INFORMATIKA

12th Grade

•

30 Qs

FINAL_QUIZ_TERM2_Authorware

FINAL_QUIZ_TERM2_Authorware

9th - 10th Grade

•

30 Qs

FCS Semester Review

FCS Semester Review

9th - 12th Grade

•

28 Qs

Bài kiểm tra cuối năm số 2

Bài kiểm tra cuối năm số 2

9th - 12th Grade

•

30 Qs

Java Programming Quiz 10.14

Java Programming Quiz 10.14

Assessment

Quiz

•

Computers

•

9th - 12th Grade

•

Practice Problem

•

Medium

Created by

Arasaka Teacher

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...

33 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?
double x = 15.7;
int y = (int) x;
System.out.println(y);

15

16

15.7

15.0

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following code:
int a = 7;
int b = 2;
double result = (double) a / b;
System.out.println(result);
What is the output?

3

3.0

3.5

3.50

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of `z` after this code executes?
double x = 12.9;
int y = 5;
int z = (int) (x / y);

2

2.0

2.58

3

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following will correctly cast the result of the division to an integer?
double num1 = 17.8;
double num2 = 5.2;

int result = (int) (num1 / num2);

int result = (int) num1 / num2;

int result = num1 / (int) num2;

int result = num1 / num2;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?
int m = 10;
int n = 3;
double o = (double) m / n;
System.out.println(o);

3

3.0

3.33

3.3333333333333335

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be printed if this code is executed?

int score = 75;

if (score >= 70)

{System.out.println("Pass"); }

System.out.println("End of program");

Pass

End of program

Pass End of program

Nothing will be printed

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?
int x = 10;
if (x % 2 == 0) {
x = x / 2;
}
System.out.println(x);

10

5

0

2

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?