Question: Exercise 17. Identify and fix the errors in the following code: 1. public class Test { 2. public void main(String[] args) { 3. for (int
Exercise 17. Identify and fix the errors in the following code: 1. public class Test { 2. public void main(String[] args) {
3. for (int i = 0; i < 10; i++);
4. sum += i;
5.
6. if (i < j);
7. System.out.println(i)
8. else
9. System.out.println(j);
10.
11. while (j < 10);
12. {
13. j++;
14. };
15.
16. do {
17. j++;
18. } while (j < 10)
19. }
20. }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
