Question: What does this print in java? public class Main { } public static void main(String args[]) { int n = -1, x = 10; while(n
What does this print in java?
public class Main { } public static void main(String args[]) { int n = -1, x = 10; while(n >= -1 && n*x < 5) { n = n + 1; System.out.print(n); System.out.print("DONE"); } }
Step by Step Solution
3.45 Rating (155 Votes )
There are 3 Steps involved in it
This Java program contains a main method that performs a loop and prints the values of n until the c... View full answer
Get step-by-step solutions from verified subject matter experts
