E81 CSE 131 Lecture 1: Data Types Part 1
magentarat813 and 20 others unlocked
8
E81 CSE 131 Full Course Notes
Verified Note
8 documents
Document Summary
Integers i. e. number of people in a room. Data type choice is dependent of the types of values of interest and the operations that can be done to them. Best choice for a data type is not always obvious. Int data type integer valued items can be negative, 0, or positive there are min/max values in most programming languages. For java an int can be in the range -2,147,483,648 -> 2,147,483,647. Can"t use letters/fractions so some types of data can"t be stored as ints. When declaring a variable it is represented by: Ex. int numstudents = 390; (note that the value is computed first before it is stored) Next word begins with uppercase letter (camel case) Should be clear and meaningful (maintain code readability) When the type of a variable has already been declared it is not redeclared just redefined.