Give the output of the following program segment: for (int i = 10; i> 6; i = i - 2) System.out.println(i);
Advertisements
Question
Give the output of the following program segment:
for (int i = 10; i> 6; i = i - 2) System.out.println(i);
Very Short Answer
Advertisements
Solution
Output:
10
8
shaalaa.com
Is there an error in this question or solution?
Chapter 7: Statements and their Scope - EXERCISE [Page 164]
