package test;
public class Test101 {
public static void main(String[] args) {
int j = i;
}
}
class Test102 {
int i = 123;
}
i cannot be resolved to a variable
怎么错了?
package test;
public class Test101 {
public static void main(String[] args) {
int j = i;
}
}
class Test102 {
int i = 123;
}
i cannot be resolved to a variable
怎么错了?
因为你定义的i不在本类中,且i的权限是默认,test101类无法访问