Continuing Java Basics

New Terminology

instantiate
Process of creating an instance or occurrence of a complex container (like a specific Scanner object).
qualified name
A name which includes a directive to a particular class or object in its reference (like System.in). Qualified names use the . (dot) operator.
token
A part of a line of text. Tokens are separated from one another by delimiters.
delimiter
A symbol which separates tokens in a String. In the written word, space is a delimiter.
buffer
An area in memory that is used in input and output operations

Programming specific structures and terms

Scanner
A class which provides input (among other) services.
System.in
An object which represents keyboard entry.
int nextInt()
A scanner method which returns an int value that is typed using the keyboard.
double nextDouble()
A Scanner method which returns a double value that is typed using the keyboard.
String nextLine()
A Scanner method which returns a String which is the full line of text.
String next()
A Scanner method which returns the next token that was typed on the keyboard.
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.
import
A statement which directs the compiler to a particular package in which to find java class. NOTE: java.lang classes are automatically imported.

Class notes

  1. Review lab from Thursday. TestOps.java, MathOps.java, worksheet.txt
  2. String class methods - Reference 2.9 (page 72) StringMethods.java
  3. Scanner class methods - Reference 2.13 (page 84) Payroll.java
    1. import
    2. declaration
    3. instantiation
    4. prompts
    5. "nexts"
    6. InputProblem.java and its correction.
  4. Formatting
    1. NumberFormat (see example, you will use decimal format for most things)
    2. DecimalFormat - Reference 3.10 (page 155 - 160)
    3. PayrollV2.java