D Deepak Sahoo • 10.78K Points Tutor II Bookmark Embed Report View In MB-Short Q. Which of the following is the correct syntax for a while loop in Java? (A) while (x < 10) { System.out.println(“Hello”); } (B) do { System.out.println(“Hello”); } while (x < 10); (C) for (int i = 0; i < 10; i++) { System.out.println(“Hello”); } (D) while (x < 10) System.out.println(“Hello”); Correct Answer - Option(A) Views: 141 Filed under category JAVA Share
Discusssion
Login to discuss.