|
|
When designing a class, one of the programmer’s jobs is to define the attributes of the class. Java allows two different types of attributes: objects and primitive data types. Using objects as attributes will come naturally as you become more used to OOP. Java provides several primitive data types to store basic information and uses objects to fill in gaps that are not provided with the primitive data types. Java is a richly typed language, which means that it gives the programmer a wide variety of data types to use. As the name suggests, primitive data types are very basic in nature. In this lesson you will declare variables, store values in them, learn operations to manipulate and use those values, and print out the values using the System.out object.
The key topics for this lesson are:
- Identifiers in Java
- Primitive Data Types in Java
- Declaring and Initializing Variables in Java
- Printing Variables Using the System.out Object
- Assignment Statements
- Math Operators
- Precedence of Math Operators
- Assignment Operators
- Increment and Decrement Operators
|