Shared Flashcard Set

Details

SCJP 6 Chapter 1
Flashcards for the Sierra/Bates SCJP 6 exam prep book. Chapter 1 - Declarations and Access Control
10
Software
Professional
02/06/2011

Additional Software Flashcards

 


 

Cards

Term
What are Java identifiers (e.g. variable, method, class names, etc) allowed to start with?
Definition
letters
$ (currency character)
_ (underscore)

Ref: P. 5
Term
What characters may identifiers contain after the first character?
Definition
letters
$ (currency characters)
_ (underscore)
numbers

Ref: P. 5
Term
T/F: The following identifier is legal:
int $c;
Definition
T

Ref: P. 5
Identifiers must start with a letter, currency char ($) or underscore, and may contain any combination of letters, currency chars, underscores or numbers thereafter.
Term
T/F: The following identifier is legal:
int _____2_w;
Definition
T

Ref: P. 5
Identifiers must start with a letter, currency char ($) or underscore, and may contain any combination of letters, currency chars, underscores or numbers thereafter.
Term
T/F: The following identifier is legal:
int _a;
Definition
T

Ref: P. 5
Identifiers must start with a letter, currency char ($) or underscore, and may contain any combination of letters, currency chars, underscores or numbers thereafter.
Term
T/F: The following identifier is legal:
int :b;
Definition
F

Ref: P. 5
Identifier does not start with a letter, currency char ($) or underscore.
Term
T/F: The following identifier is legal:
int -d;
Definition
F

Ref: P. 5
Identifier does not start with a letter, currency char ($) or underscore.
Term
T/F: The following identifier is legal:
int e#;
Definition
F

Ref: P. 5
Identifier contains an illegal character (#).
Term
T/F: The following identifier is legal:
int .f;
Definition
F

Ref: P. 5
Identifier contains an illegal character (.).
Term
T/F: The following identifier is legal:
int 7g;
Definition
F

Ref: P. 5
Identifier does not start with a letter, currency char ($) or underscore.
Supporting users have an ad free experience!