关于以下程序代码的说明正确的是?()
public class HasStatic{
private static int x=100;
public static void main(String args[]){
HasStatic hs1=new HasStatic();
hs1.x++;
HasStatic hs2=new HasStatic();
hs2.x++;
hs1=new HasStatic();
hs1.x++;
HasStatic.x--;
System.out.println("x="+x);
}
}
程序通过编译,输出结果为:x=103
10行不能通过编译,因为x是私有静态变量
5行不能通过编译,因为引用了私有静态变量
程序通过编译,输出结果为:x=102