Lesson A3
Next: Identifiers In JavaLesson Overview: 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 American Standard Code for Information Interchange is a character encoding standard for electronic communication, representing characters as numbers.
(=) Assigns the value of the expression on the right to the variable.
A data type that has one of two possible values (true/false), from Boolean algebra.
A data type representing a single ASCII character.
(--) Decrements (decreases) a value by one.
A data type representing any signed or unsigned number with a decimal point.
Special codes used to print unusual or reserved characters, such as quotes. They being with a \.
A data type representing a floating-point number. Less precise than a double.
(++) Increments (increases) a value by one.
A programmer-defined name used to reference classes, methods, constants, variables, or anything a programmer is required to define.
A data type representing an integer.
(%) Calculates the remainder of division between two integers or decimal numbers.
Rules governing the order in which a mathematical expression is solved. Similar to the mathematical order of operations.
Colloquially referred to as "primitives", these are raw data containers provided by the native Java SDK.
Certain keywords reserved by Java that cannot be used as identifiers. (ex: import, new)
Hard-coded characters enclosed within double quotation marks, representing a String.
Converting a variable from one data type to another. In the context of numbers, high-to-low precision requires typecasting, while low-to-high is done automatically.