Search Header Logo

Java Math

Authored by Bob Powers

Computers

9th - 12th Grade

Used 59+ times

Java Math
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

15 questions

Show all answers

1.

FILL IN THE BLANKS QUESTION

1 min • 1 pt

What will the following code segment print?

System.out.println(4 / 5);

(a)  

2.

FILL IN THE BLANKS QUESTION

1 min • 1 pt

What will the following code segment print?

System.out.println(4 * 2.0);

(a)  

3.

FILL IN THE BLANKS QUESTION

1 min • 1 pt

What will the following code segment print?

System.out.println("b" + 2 * 2);

(a)  

4.

FILL IN THE BLANKS QUESTION

1 min • 1 pt

What will the following code segment print?

System.out.println(1 / 2.0);

(a)  

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the value in variable x after this code segment is executed?

int x = 5.0 + 2;

7

7.0

There will be a runtime error

There will be a syntax error

5.02

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the value in variable x after this code segment is executed?

String x = "" + 4 + 2;

"6"

"6.0"

There will be a runtime error

There will be a syntax error

"42"

7.

FILL IN THE BLANKS QUESTION

1 min • 1 pt

What will the following code segment print?

System.out.println(17 % 3);

(a)  

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?