Question 1 of 10
What text does this Java code display?
int yeast = 3; // yeast = 11;
System.out.print(yeast);
- A. 11
- B. 3
- C. 0
- D. The code cannot compile.
What text does this Java code display?
int yeast = 3; // yeast = 11;
System.out.print(yeast);
What text does this Java code display?
int flour = 8;
/* flour *= 2;
flour += 1; */
System.out.print(flour);
What is the purpose of a Javadoc comment written with /** */?
What text does this Java code display?
System.out.print("Mix // gently");
What text does this Java code display?
System.out.print("A");
// System.out.print("B");
System.out.print("C");
What text does this Java code display?
System.out.print("P"); /* System.out.print("Q");
System.out.print("R"); */
System.out.print("S");
A baker writes // double the glaze next to an assignment. Which statement is true?
What text does this Java code display?
int pans = 4;
pans += 2; // was pans += 9;
System.out.print(pans);
Which comment form comments out exactly the rest of its source line and nothing on later lines?
A student comments out a suspect line while testing. What text does this Java code display?
| Line | Source |
|---|---|
| 1 | int glaze = 5; |
| 2 | // glaze *= 4; |
| 3 | glaze += 3; |
| 4 | System.out.print(glaze); |