Consider the following class:
class Test{ public static void main (String [] args){ for (int i = 0; i < 10; i++) System .out.print (i + " "); //1 for (int i = 10; i > 0; i--) System .out.print (i + " "); //2 int i = 20; //3 System .out.print (i + " "); //4 } }
Which of the following statements are true?
Select 4 options
Correct Options are : A B C D
The scope of a local variable declared in 'for' statement is the rest of the 'for' statement, including its own initializer.