Site MapHelpFeedbackChapter Summary
Chapter Summary
(See related pages)

• A variable is a memory location in which to store a value.
• A variable has a name and a data type.
• A variable must be declared before we can assign a value to it.
• There are six numerical data types in Java: byte, short, int, long, float, and double.
• Object names are synonymous with variables whose contents are memory addresses.
• Numerical data types are called primitive data types, and objects are called reference data types.
• Precedence rules determine the order of evaluating arithemetic expressions. • Symbolic constants hold values just as variables do, but we cannot change their values.
• The standard classes introduced in this chapter are:
Math     InputStream
GregorianCalendar    InputStreamReader
DecimalFormat    BufferedReader
PrintStream    IOException
Integer, Double, etc.
• We use methods from the wrapper classes Integer, Double, and others to convert an input string to a numerical value.
• System.out is used to output multiple lines of text to the standard output window.
• System.in is used to input a stream of bytes. We associate a BufferedReader object to System.in (with an intermediate InputStreamReader) to input one line of text at at time.
• The Math class contains many class methods for mathematical functions.
• The GregorianCalendar class is used in the manipulation of calendar information.
• The DecimalFormat class is used to format numerical data.
• (Optional) Twos complement format is used for storing integers, and floating-pointing format is used for storing real numbers.







WuOnline Learning Center

Home > Chapter 3 > Chapter Summary