Indiana University Bloomington Evaluation Services and Testing
QuizSite  Students
Quizzes · Tests · Evaluations · Surveys
 Activity: Practice_One Student: dgerman (Adrian German) Instructor: dgerman Course: J201 Section: 4285
Question 1.
What is the output produced by the following three lines (when correctly embedded in a complete program)?
```int x, y;
x = 2; y = 3;
y = x;
System.out.println(x + y); ```

Question 2.
What is the output produced by the following three lines (when correctly embedded in a complete program)?
```int x, y;
x = 2; y = 3;
y = x;
System.out.println(x + " versus " + y); ```

Question 3.
What is the output produced by the following two lines (when correctly embedded in a complete program)?
```int x, y;
x = 2; y = 3;
System.out.println("1" + x + y); ```

Question 4.
What is the output produced by the following two lines (when correctly embedded in a complete program)?
```int x, y;
x = 2; y = 3;
System.out.println("1" + (x + y)); ```

Question 5.
What is the output produced by the following two lines (when correctly embedded in a complete program)?

Please note that the variables are of type `char`.

```char a, b, c;
a = 'B'; b = 'C'; c = a;
System.out.println(a + c + 'C'); ```

Question 6.
What is the type of this expression?
`5 * (7 + 4 / 2)`

(Please use the Java keyword for the type).

Question 7.
What is the type of this expression?
`i != 3`

(Please use the Java keyword for the type. Also, assume `i` is a `double`).

Question 8.
What is the output produced by the following two lines (when correctly embedded in a complete program)?

Please note that the variables are of type `int`.

```int a, b;
a = 12; b = 5;
System.out.println(a / b); ```

Question 9.
What is the output produced by the following two lines (when correctly embedded in a complete program)?

Please note that the variables are of type `int`.

```int a, b;
a = 12; b = 5;
System.out.println(a % b); ```

Question 10.
What is the output produced by the following two lines (when correctly embedded in a complete program)?

```int a; a = 'C' - 'A';
System.out.println(a); ```