E81 CSE 131 Lecture 1: Data Types Part 1

42 views2 pages
magentarat813 and 20 others unlocked
E81 CSE 131 Full Course Notes
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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers