1. What is the output of the following code?
int i = 0;
for(i = 0 ; i < 5; i++){
}
System.out.println(i);
Ans. 5.
2. What is the output of the following code?
public class Test{
public static void main(String []args){
int i = 0;
for(i = 0; i < 10; i++){
break;
}
System.out.println(i);
}
}
Ans. 0.
