Syntax Flashcards
(3 cards)
1) Naming a class
a) You CANNOT use k_________
b) You CANNOT use o_________ or m__________ symbols
c) The name CANNOT have sp________.
d) The name MUST start with either a l_________, an u___________ ( _ ) or a d__________ symbol ($)
keywords
operators, mathematical
spaces
letter, underscore, dollar
2) Naming a Variable
a) Use lower c______ case
You can begin with a n________, u________ or d__________, e.g. 2myCar, _myCar, $myCar, but this is
NOT the convention!
camel case
number
underscore
dollar
Important Note!!!!!!
variables are ONLY “visible” within the pair of curly brackets in which they have been declared—this
means that if they are referred to in a part of the program outside these brackets, then you will get a compiler error.
3) Variables
You can/cannot use a variable that has not been initialised?
cannot