What is the result? Given: What is the result? Given: What is the result? A. 2 1 0 B. null C. an infinite loop D. compilation fails E. 2 1 Explanation: Show Hint ← Previous question Next question →
Kevin D because (–ii) is not a boolean value. If you execute the following then E would be the correct answer: public class DoWhile1 { public static void main (String [] args) { int ii = 2; do { System.out.println (ii); } while (–ii>0); } } Reply
D
D because (–ii) is not a boolean value. If you execute the following then E would be the correct answer:
public class DoWhile1 {
public static void main (String [] args) {
int ii = 2;
do {
System.out.println (ii);
} while (–ii>0);
}
}
Answer: D