class DowhileEx1 {
public static void main(String args[]) {
int i,j = 0;
while(i<11){
while(j<=i) {
j ++;
System.out.println("*");
}
i++;
System.out.println("*");
}
}
}
public static void main(String args[]) {
int i,j = 0;
while(i<11){
while(j<=i) {
j ++;
System.out.println("*");
}
i++;
System.out.println("*");
}
}
}
에러 내용 :
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The local variable i may not have been initialized
The local variable i may not have been initialized
The local variable i may not have been initialized
at DowhileEx1.main(DowhileEx1.java:4)
영어 ㅡㅡ;
i에 초기화 안 했음
int i=0,j=0;