Java Basics - Day 21 SQ

Java Basics - Day 21 SQ

10th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Ai nhanh hơn - Tin 11 (chương 1,2,3)

Ai nhanh hơn - Tin 11 (chương 1,2,3)

11th Grade

10 Qs

Java Script

Java Script

10th - 12th Grade

10 Qs

Do Now Lesson 2

Do Now Lesson 2

9th - 12th Grade

15 Qs

AP CSP Unit 4

AP CSP Unit 4

10th - 12th Grade

15 Qs

CS Disco U3L12

CS Disco U3L12

6th - 12th Grade

10 Qs

Variables Unit 5

Variables Unit 5

10th - 12th Grade

14 Qs

data_type

data_type

12th Grade - University

10 Qs

Unit 4 Test JS

Unit 4 Test JS

9th - 12th Grade

15 Qs

Java Basics - Day 21 SQ

Java Basics - Day 21 SQ

Assessment

Quiz

Computers

10th - 12th Grade

Medium

Created by

Courtney Yatteau

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When we want to print in Java, we use the code ......
system.out.print();
System.out.println();
System.Out.Printf();
System.out.show();

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A variable that holds a whole number
String
boolean
int
float

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A variable that holds words
String
boolean
int
float

4.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

Suppose that addition and subtraction had higher precedence than multiplication and division. Then the expression:


2 + 3 * 12 / 7 - 4 + 8


would evaluate to which of the following?

11

12

5

9

-4

5.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

Assume that a and b are integers. The boolean expression

!( a <= b) && (a * b > 0)

will always evaluate to true given that

a = b

a > b

a < b

a > b and b > 0

a > b and b < 0

6.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

Consider the following code segment:

Line 1: int a = 10;

Line 2: double b = 10.7;

Line 3: double c = a + b;

Line 4: int d = a + c;

Line 5: System.out.println(c + " " + d);


What will be output as a result of executing the code segment?

20 20

20.0 30

20.7 31

20.7 30.7

Nothing will be printed because of a compile-time error.

7.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

Consider the following code segment:


int var = 12;

var = var % 7;

var = var - 1;

System.out.println(var);


What is printed as a result of executing the code segment?

0

1

2

4

5

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?