Type in your answers to each of these questions in a file named
prelab03.txt
in your Prelab Questions
directory. Turn in your answers before the
beginning of your laboratory session.
Question #1: What are the five Java arithmetic operators?
Question #2: The order in which an expression's operators are applied is usually determined by the ____________ and the ____________ of those operators.
Question #3: The symbols ++
and
--
perform the ____________ and ____________
operations, respectively.
Question #4: The +=
operator is an
example of an ____________ shortcut.
All of the code written here compiles fine (in the right context).
Code #1: Write an expression that evaluates to sum of 2 and 3. Write only the expression.
Code #2: The expression
"Hi" + "there"
evaluates to what?
Code #3: Consider these statements:
double n = 3 / 2; double x = 3.0 / 2.0;
What values are stored in n
and x
?