AP Java Unit 2 Quiz

AP Java Unit 2 Quiz

10th - 12th Grade

25 Qs

quiz-placeholder

Similar activities

Java Review 2

Java Review 2

9th - 12th Grade

20 Qs

Comprog - (Review) - October 24, 2022

Comprog - (Review) - October 24, 2022

11th Grade

25 Qs

Computer Science

Computer Science

9th - 12th Grade

20 Qs

CodeHS Fundamentals of CS Unit 8

CodeHS Fundamentals of CS Unit 8

8th - 10th Grade

22 Qs

SKT4-1.3: PEMBOLEH UBAH, PEMALAR DAN JENIS DATA

SKT4-1.3: PEMBOLEH UBAH, PEMALAR DAN JENIS DATA

10th - 11th Grade

20 Qs

if_else Java

if_else Java

12th Grade

20 Qs

FCS Fall Collective review

FCS Fall Collective review

9th - 10th Grade

21 Qs

UTS DASPRO

UTS DASPRO

1st - 10th Grade

20 Qs

AP Java Unit 2 Quiz

AP Java Unit 2 Quiz

Assessment

Quiz

Computers

10th - 12th Grade

Medium

Created by

Richard Whitehead

Used 69+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the name of the method to print out text in Java?

System.out.println()

System.out.PRINTLN()

System.output()

System.out.printline()

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following lines?


int x = 24;

System.out.println("The total is " + x + x);

The total is x + x

The total is 48

The total is 2424

The total is 24

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is not a primitive type?

String

char

boolean

int

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the value of x after this code?

int x = 5;

x = 10;

x = 4;

5

true

10

4

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the proper syntax to declare and initialize a double called temperature to have the value 70.4?

int temperature = 70.4;

double temperature = 70.4;

temperature = 70.4;

float temperature = 70.4;

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the result of this expression?


(int) (5 + 2 / 3 + 1)

6

5

6,67

0

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which expression returns the 1’s place of an integer x?

x + 1

x % 10

x % 100

x / 10

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?