problem about using "while"
i'm learning java programing, i want to use while term but there is an error : illegal start of type :( what can i do?
public class WhileOrnek {
int i = 0 ;
while (i < 5 ) {
System.out.println("i = " + i);
i++ ;
System.out.println("Congratulation! ");
}
}
where is the mistake?

