Leave a Reply 3

Your email address will not be published. Required fields are marked *


pojo

pojo

int arr[]={1,2,3};
for(int var:arr){
int i=1;
while(i B

xxx

xxx

public class Access {
public static void main(String[] args){
int arr[] = {1,2,3};
for(int var:arr){
int i =1;
while(i<=var);
System.out.println(i++);
}
}
}

b

Roger

Roger

the reason is the semicolon after the while statement