下面代码在main()方法中第八行后可以正常使用的是()
public class Test
{
private int a=10;
int b=20;
static int c=1;
public static void main (String arg[]){
Test t=new Test();
}
}
A. t.a
B. this.c
C. Test.b
D. Test.c
答案: AD
解析:
A. private 修饰****不能在外部类中调用,main方法数以Test类的方法,所以对象t可以在他自己的类方法中调用他的private
B. static 方法中没有 this这一说
C. b不是static变量
D. 合理