
Chapter 4
1. What are the 8 built in types?
- int, byte, short, long, double, float, char, Boolean.
2. What is a constant?
- A value that cannot be changed by a program. Constants are defined with the
keyword final.
3. All constants should be delcared as what access specifier and use modifier?
- public static
4. What is increment and decrement?
- increment is adding 1 and is represented by ++ , decrement is subtracting 1 and is
represented by --
5. What is assignment?
- It is not setting the left side to the right side, but rather places a value into a variable.
In Java x = x + 1 while in algebra this would make no sense.
6. How are the arithmetic operations performed?
7. What is integer division and how is it different then floating point division?
Floating point division works like normal division, there has to be a decimal involed
for example 7.0/4 = 1.75, In integer division 7/4 = 1 R3 and the R3 is discarded.
8. What is modulus?
- Modulus is an operator that computes the remainder of a division. 7 % 4 = 3.
9. What is a static method and how do you call it?
- A method that does not operate on an object.
Chapter 5
1. What is the if statement?
- a statement used to make a decision depending on a condition.