Constants Flashcards

1
Q

USER_NAME

Is this the name of a constant?

A

USER_NAME

Yes, this is a constant. It is named using the UPPERCASE naming convention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

nameOfPlayer

Is this the name of a constant?

A

nameOfPlayer

No, this is a variable, named using the camelCase naming convention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

numberOfOrcs

Is this the name of a constant?

A

No. This is a variable, named using the camelCase naming convention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

NUMBER_OF_EMPLOYEES

Is this the name of a constant?

A

NUMBER_OF_EMPLOYEES

Yes, this is a constant. It is named using the UPPERCASE naming convention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

PLAYER_NAME

Is this the name of a constant?

A

PLAYER_NAME

Yes, this is a constant. It is named using the UPPERCASE naming convention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

PLAYER-NAME

Is this the name of a constant?

A

PLAYER-NAME
No, this is not a constant. The hyphen is not used in naming constants. It should be named PLAYER_NAME with an underscore.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

PLAYER NAME

Is this the name of a constant?

A

No. This is either two constants, or it is one constant missing an underscore. It should be: PLAYER_NAME

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

DEFAULT_RATE

Is this the name of a constant?

A

DEFAULT_RATE

Yes, this is a constant. It is named using the UPPERCASE naming convention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

MPG

Is this the name of a constant?

A

MPG

Yes, this is a constant. It is named using the UPPERCASE naming convention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

country

Is this the name of a constant?

A

country

No, this is a variable named using the camelCase naming convention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

mySchool

Is this the name of a constant?

A

mySchool

No, this is a variable named using the camelCase naming convention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

aConstant

Is this the name of a constant?

A

aConstant

No, this is a variable named using the camelCase naming convention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

VARIABLE

Is this the name of a constant?

A

VARIABLE
Yes, this is a constant. It is named using the UPPERCASE naming convention. But it is poorly named and likely to cause confusion..

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

TEAM_NAME

Is this the name of a constant?

A

Yes, this is a constant. It is named using the UPPERCASE naming convention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

DOG_NAME

Is this the name of a constant?

A

Yes, this is a constant. It is named using the UPPERCASE naming convention.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly