Interactive Input - The Class Scanner
Sometimes data is needed and obtained from the user at run time.
Simple keyboard input requires:
at the beginning
Primitive Types and Strings
Variables, Values, and Expressions
The Class String
=> Section 1.2
Variables and Values
Variables are memory locations that store data such as numbers and letters.
The data stored by a variable is called its valu
Testing for equality with strings.
Lexicographic ordering of strings.
Other string methods.
Strings and Testing for Equality
The = operator is also not appropriate for determining if two objects,
such as strings, have the same value.
Four integer types:
int (most common)
Two floating-point types:
double (most common)
One character type:
One boolean type:
Primitive Types, cont.
Examples of Primitive Values
Flow of Control