ITM 200 Chapter 3: Chapter 3

64 views5 pages

Document Summary

Identifiers - are the names for the variables, classes,constants and methods. must start with a letter, _ , or a dollar sign. Variables hold information like 12, hello , g, 024604#&*fgyy. Radius = 4, where radius is the variable. when declaring a variable, you must have the data type and the variable. ex. int age; or double income;, char letter, string name; where int, is a whole name like 56. where double, is a number with decimals like 445. 333333. where char, is a letter like t or u. Therefore a variable can be declared like: int radius = 1; or int radius; char letter = t"; or char letter; radius = 1; letter = t"; Constant is a variable that is final, which means that the value of the constant cannot be changed. Literals is the value that a variable holds. Int x = 5, the literal value is 5.