单选题

关于以下程序代码的说明正确的

发布于 2022-03-03 22:34:06

关于以下程序代码的说明正确的

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)
    }
}



登录后免费查看答案
关注者
0
被浏览
18
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看