ANHB1101 Study Guide - Final Guide: Dynamic Array, Escape Character, Reserved Word
Document Summary
If a number literal has a decimal point, it is a floating point number. Otherwise, it is an integer: a numeric computation overflows is the result that falls outside the range for the number type, rounding errors occur when an exact representation of a floating point number is not possible. Section 4. 1. 2: numerical constants are values that do not change and that have a special significance for a computation, constants are identified with the reserved word final. A variable tagged as final can never change after it has been set: many final variables use all uppercase names for constants, we use the public static final (data type) (upper case variable name) format. The most commonly used types are ints: suppose you want to write a program that works with population data from various countries. Int would work, however long is preferred: a. This is wrong, as integers return whole number values b.