Continuing Java Basics - Intro to decisions

New Terminology

Reference type
A data type in which the variable provides a reference to the object (where the data is stored)
Primitive type
A data type which is built into the language

Programming specific structures and terms

NumberFormat
A class which provides helpful methods for formatting numbers
getCurrencyInstance()
A method in the NumberFormat class which returns a NumberFormat object which has been preformatted for displaying numbers with currency symbols.
DecimalFormat
A class which provides helpful methods for formatting decimal numbers.
if statement
A statement in java which provides branching or doing one of two alternative actions

Class notes

  1. Scanner - One problem with input.
    1. InputProblem.java and its correction.
  2. Formatting
    1. NumberFormat (see example, you will use decimal format for most things)
    2. DecimalFormat - Reference 3.10 (page 155 - 160)
    3. PayrollV2.java
  3. Math class
    1. "static" methods
    2. require the use of the name of the class, Math
    3. cannot instantiate a "Math" object
    4. methods provide a number of different math functions.