Variables and Their Definitions
February 3rd, 2016
Lecture Code
Course Class Topics
- Data types (primitive and derived)
- Scope of variables
- Count the number of students in a course.
Method Headers
Will it compile?
Primitive Data Types
- int (byte, short, long)
- double (float)
- char
- boolean
Primitive Data Type Variable Naming Conventions
- The variable name should be meaningful.
- The variable name should start with a lowercase letter.
- Other legal symbols include letters, digits, underscores and the dollar
sign.
After Class Exercise
Conduct similar experiments to find the largest and smallest
numbers represented by byte, short and long.