Lecture 4
9
Declaring variables
•You must tell the compiler the kind of value you want to store, and the name of the place you will store it
•Declaration syntax: type name;
•type tells the compiler what kind of value you want to store •name is the identifier you choose so that you can refer to the variable elsewhere in the program
•Declaration may (but need not) initialize value
•