Variables Review

Variables Review

12th Grade

12 Qs

quiz-placeholder

Similar activities

AP CSP Unit 4

AP CSP Unit 4

10th - 12th Grade

15 Qs

Topic 3 & 4 Practice - ArrayList and String Methods

Topic 3 & 4 Practice - ArrayList and String Methods

12th Grade

15 Qs

CSP I: Unit 4 Review

CSP I: Unit 4 Review

9th - 12th Grade

10 Qs

PYTHON

PYTHON

12th Grade

8 Qs

AP CSP Review

AP CSP Review

9th - 12th Grade

10 Qs

Java Basics

Java Basics

12th Grade

17 Qs

AP CSP 2020 Midterm Review

AP CSP 2020 Midterm Review

10th - 12th Grade

16 Qs

[Generation Girl] - Day 1 (Post Test)

[Generation Girl] - Day 1 (Post Test)

6th Grade - University

15 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
a = 11
c = 23
b = 61
a = 61
a = 23
c = 11
b = 23
c = 61
b = 11

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?