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