判断题

请写出以下java代码的输出内容[$##$] public class...

发布于 2022-03-03 16:32:07

请写出以下java代码的输出内容()
public class TestCount {
   
public static void main(String args[]) {
       
Count count = new Count( )
       
count.count(count.getCount( )).getCount( )
       
new Count( ).count(count.getCount( ))
    }
   
public static class Count {
        volatile Integer count = 2018
       
public Count count(Integer count) {
           
System.out.println(++count)
           
return this
       
}
       
public Integer getCount( ) {
           
System.out.println(++count)
           
return count
       
}
    }
}

关注者
0
被浏览
33
知识点
面圈网VIP题库

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

去下载看看