Java Lesson 9

Java Lesson 9

5th Grade - University

12 Qs

quiz-placeholder

Similar activities

Java Lesson 11

Java Lesson 11

5th Grade - University

10 Qs

Kiểm tra kiến thức về lỗi chương trình trong Python

Kiểm tra kiến thức về lỗi chương trình trong Python

10th Grade - University

10 Qs

TE COMP C#

TE COMP C#

University

9 Qs

CSP Unit 5 Assessment 2 review (code.org)

CSP Unit 5 Assessment 2 review (code.org)

9th - 12th Grade

13 Qs

C PROGRAMMING

C PROGRAMMING

University

15 Qs

Java Variables and Control Structures lec2

Java Variables and Control Structures lec2

University

10 Qs

Functions in Python

Functions in Python

9th - 12th Grade

16 Qs

Java Arrays

Java Arrays

5th Grade - 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?