# Quiz ＃1

## Wednesday

With a piece of paper, write down your name and answers to for following questions.

1. Which of the following is a valid `println` statement?

1. `System.out.println + "Hello World";`
2. `out.System.println("Hello World");`
3. `println.out("Hello World");`
4. None of the above is valid
2. `&&`, `||`, and `!` are ____.

1. relational operators
2. logical operators
3. conditional operators
4. ternary operators
3. This type of method does not return a value

1. null
2. void
3. empty
4. anonymous
4. Find the error in the following class:

public class MyClass {
private int x;
public void MyClass(int a) {
x = a;
}
}

Correction:

public class MyClass {
private int x;
public MyClass(int a) {
x = a;
}
}

### Student Performance and Statistics

A histogram of student performance on percentage grades for Quiz 1 on Wednesday.

A table showing the average performance for each question in Quiz 1 on Wednesday.

## Friday

With a piece of paper, write down your name and answers to for following questions.

1. These characters mark the beginning of a single-line comment.

1. `//`
2. `/*`
3. `*/`
4. `/**`
2. This type of expression has a value of either `true` or `false`.

1. binary expression
2. decision expression
3. unconditional expression
4. boolean expression
3. What will the `println` statement in the following program segment display?

int x = 5
System.out.println(++x);
1. 5
2. 6
3. 0
4. None of these
4. Find the error in the following method.

public static double timesTwo(double num) {
double result = num * 2;
}

Correction:

public static double timesTwo(double num) {
double result = num * 2;
return result;
}

### Student Performance and Statistics

A histogram of student performance on percentage grades for Quiz 1 on Friday.

A table showing the average performance for each question in Quiz 1 on Friday.