Card 2 / 43: Which of the following are true for variables?
A)
Variables can contain all different types of numbers/symbols and letters. Example: int my^Num1;
B)
Variables can start with numbers: ex) int 2Num;
C)
Variables can start with underscores: ex) int _newNum;
D)
Variable names can only contain numbers,underscores and letters for every character other than the first one. ex) int myNum_new;
E)
Variable names, by convention, start with lowercase. ex) int myNum;
Answer:
C) Variables can start with underscores: ex) int _newNum;
D) Variable names can only contain numbers,underscores and letters for every character other than the first one. ex) int myNum_new;
E) Variable names, by convention, start with lowercase. ex) int myNum;
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
However they can only start with either letters or underscores.
Using java convention, variables usually begin with lowercase letters.
|