Variables Review

Variables Review

12th Grade

12 Qs

quiz-placeholder

Similar activities

Java Thread

Java Thread

12th Grade

10 Qs

SC C++ Quiz 2

SC C++ Quiz 2

7th - 12th Grade

15 Qs

APCSA Unit 3 Review

APCSA Unit 3 Review

9th - 12th Grade

13 Qs

29W Quiz 1 - PLTW

29W Quiz 1 - PLTW

8th - 12th Grade

15 Qs

Ap computer science a

Ap computer science a

1st - 12th Grade

15 Qs

C++ Unit 1 Review

C++ Unit 1 Review

9th - 12th Grade

15 Qs

python intro

python intro

4th - 12th Grade

17 Qs

Unit 4 AP CSA Review

Unit 4 AP CSA Review

12th Grade

13 Qs

Variables Review

Variables Review

Assessment

Quiz

Computers

12th Grade

Easy

Created by

Nichole Niebur

Used 7+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following will properly declare an String named 'school' that has a value of "Millard North".

String school = "Millard North";

string school = "Millard North";

String school = 'Millard North';

String school = "Millard North"

Answer explanation

Media Image

Did you notice the missing ;

2.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

Declare an integer named 'x' that has a value of '15'

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Declare an boolean named 'x' that has a value of 'false'

4.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Declare an double named 'x' that has a value of '15'

Answer explanation

Media Image

Remember doubles hold floating point numbers so 15 would be stored as 15.0

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Declare an char named 'x' that has a value of '5'

Answer explanation

Media Image

Remember char uses single quotes ' '

not double quotes " "

6.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Declare an String named 'x' that has a value of '5'

Answer explanation

Media Image

Remember char uses single quotes ' '

String uses double quotes " "

7.

LABELLING QUESTION

1 min • 1 pt

What are the values in a, b, and c after executing each of the following statemets?

f
g
h
e
c
b = 23
b = 61
a = 11
c = 61
a = 23
b = 11
a = 61
c = 11
c = 23

Answer explanation

Media Image

Remember Java run in order top to bottom, so once something has changed that is the new value.

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?