Java Lesson 9

Java Lesson 9

5th Grade - University

12 Qs

quiz-placeholder

Similar activities

CP-2-Unit-I

CP-2-Unit-I

University

12 Qs

C Programming First Quiz - Sec H

C Programming First Quiz - Sec H

University

10 Qs

C Functions

C Functions

University

10 Qs

KNOWLEDGE GAME

KNOWLEDGE GAME

University

11 Qs

Predict The Output

Predict The Output

University

15 Qs

Exceptions and I/O

Exceptions and I/O

University

10 Qs

execption handling

execption handling

University

17 Qs

Quiz 1 - Intro to C

Quiz 1 - Intro to C

University

10 Qs

Java Lesson 9

Java Lesson 9

Assessment

Quiz

Other

5th Grade - University

Medium

Created by

Rohit Sharma

Used 1+ times

FREE Resource

12 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

What will the following code segment print?

System.out.println(4 / 5);

2.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

What will the following code segment print?

System.out.println(4 * 2.0);

3.

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"

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

int x = (int) 5.0 / 2;

2

2.5

There will be a runtime error

There will be a syntax error

3

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

double x = (double) 5 / (int) 2

2

2.5

There will be a runtime error

There will be a syntax error

2.0

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

double x = (double) 5 / (int) 2

2

2.5

There will be a runtime error

There will be a syntax error

2.0

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of num?
double num = Math.sqrt(49);
7
7.0

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?