Data
Objectives
Applied
- Given the specifications for an application that uses any of the eight primitive data types presented in this chapter, write the application.
- Use the NumberFormat, Math, Integer, Double, and BigDecimal classes to work with data.
- Given the Java code for an application that uses any of the language elements presented in this chapter, explain what each statement in the application does.
Knowledge
- Describe any one of the eight primitive types.
- Distinguish between a variable and a constant.
- Given a list of names, identify the ones that follow the naming recommendations for constants presented in this chapter.
- Explain the difference between a binary operator and a unary operator and give an example of each.
- Explain the difference between prefixing and postfixing an increment or decrement operator.
- Explain what a shortcut assignment operator is and how you use one in an assignment statement.
- List the order of precedence for arithmetic operations and explain how you can change the order in which operations are performed.
- Explain what casting is, when it's performed implicitly, and when you must perform it explicitly.
- Describe how casting between int and double types can affect the decimal value in a result.
- Describe the primary uses of these classes: NumberFormat, Math, Integer, and Double.
- List two reasons for using the BigDecimal class.