GIAC
GSSP-JAVA · Question #85
Mark works as a Programmer for InfoTech Inc. He develops the following program. class iftest2 {public static void main(String args[]) {int x=0, y=1;if //code//{System.out.println("true");}}} Which…
The correct answer is A. (y == true) B. (1) C. (x == false) E. (x). See the full explanation below for the reasoning.
Question
Mark works as a Programmer for InfoTech Inc. He develops the following program. class iftest2 {public static void main(String args[]) {int x=0, y=1;if //code//{System.out.println("true");}}} Which of the following if statements are illegal if they are placed at //code//?
Options
- A(y == true)
- B(1)
- C(x == false)
- D(x == 1)
- E(x)
- F(x != y)
How the community answered
(24 responses)- A79% (19)
- D8% (2)
- F13% (3)
Community Discussion
No community discussion yet for this question.