Instructor solution
You may exit out of this review and return later without penalty.
Types & Expressions Review Assignment
1.Adjust the code so that aVar > bVar evaluates as true.
2.Fix the syntax error in the following code.
3.What are the binary arithmetic operators in Java?
4.What does the unary ! operator do in Java?
5.How could you declare and initialize a boolean variable named foo with a value of false?
6.What's the difference between an int and a double in Java?
7.What does the following code output?
java<br>int aVar = 10;<br>double bVar = 15.1;<br>double cVar = aVar + bVar;<br>System.out.println(cVar);<br>
8.What does the following code output?
java<br>double aVar = 10.0;<br>int bVar = 10;<br>System.out.println(aVar == bVar);<br>
9.What's the difference between Code A and Code B?
Code A
java<br>int aVar;<br>aVar = 10;<br>
Code B
java<br>int aVar = 10;<br>
10.What's the result of the following code?
java<br>int aVar = 10;<br>int bVar = 15;<br>int cVar = aVar + bVar;<br>
11.What does the following code output?
java<br>int aVar = 10+2*3;<br>System.out.println(aVar);<br>
12.What does the following code output?
java<br>int aVar = 1;<br>System.out.println(aVar++);<br>
You may exit out of this review and return later without penalty.