Question 1 of 10
An oven class contains the methods below. Which statement is true?
public class Oven {
private int temp;
public Oven() {
temp = 350;
}
public void preheat() {
temp += 25;
}
public int getTemp() {
return temp;
}
}
- A. preheat returns 375
- B. getTemp is void because it only looks at temp
- C. preheat is void, and getTemp is non-void
- D. Both methods must include a return value