Search Header Logo

AP CSA Variables and Operators

Authored by Sara Kazemi

Computers

9th - 12th Grade

Used 49+ times

AP CSA Variables and Operators
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which variable type is NOT a primitive variable type?

boolean

String

int

double

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a logic error?

An mistyped statement that causes the compiler to throw an exception.

An illegal operation that causes the compiler to throw an exception.

An illegal operation that causes the program to have a run-time error.

An error a programmer makes that causes the program to behave differently than expected.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to instantiate a Finch object with its default constructor?

Finch(f);

Finch f;

Finch f = Finch();

Finch f = new Finch();

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of 3/2 in Java?

1.5

1.0

1

0

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of 3.0/2 in Java?

1.5

1.0

1

0

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the % operator in Java?

percentage

homonculus

modulus

modulator

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of 3%2?

1

1.5

1.0

0

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?