Switch Statement

The switch statement lets the value of a variable or expression determine where the program will branch to.

Compared Strings

To compare Strings you must use the equals method, as a relational operator will not work due to the Strings referencing the object's address instead of the actual value.

Decimal Format

This class can be used to format the appearance of floating-point numbers rounded to a specified number of decimal places.

While Loop

The while loop can be used to create input routines that repeat until acceptable data is entered.

Do While Loop

The do-wile loop is a posttest while loop, meaning that it's boolean value is tested AFTER each iteration, meaning it will always run at least once.

For Loop

The for loop is used when performing a known number of iterations in most cases. It is a count-controlled loop that iterates the count with each iteration.