코드는 다음과 같습니다 다음 Final final = new Final(count);
에서내부 변수가 포함 된 변수를 정의 할 수 없습니까?
public class Final {
int x;
Final(int i)
{
x = i;
}
protected void finalize()
{
System.out.println("Final of the class!" + this.x);
}
public void generate(int count)
{
Final final = new Final(count);
}
}
봐 내가이 줄에서 오류가 발생합니다. (not a statement ; excepted
). 내부 변수를 포함하는 변수를 정의 할 수 없습니까?
왜 'final'이라는 이름의 변수를 선언하고 있습니까? –