Search Header Logo

Variables Review

Authored by Nichole Niebur

Computers

12th Grade

Used 7+ times

Variables Review
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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

Answer explanation

Media Image

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

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?