京东自营 618 + 国补 iPhone 历史最低价

Java 使用静态变量来计算实例

使用静态变量来计算实例
实例源码:
源代码:
执行
执行中...
执行结果:
  • There are now 0 instances of the CountTest class.
  • There are now 1 instances of the CountTest class.
  • There are now 2 instances of the CountTest class.
  • There are now 3 instances of the CountTest class.
  • There are now 4 instances of the CountTest class.
  • There are now 5 instances of the CountTest class.
  • There are now 6 instances of the CountTest class.
  • There are now 7 instances of the CountTest class.
  • There are now 8 instances of the CountTest class.
  • There are now 9 instances of the CountTest class.
  • There are now 10 instances of the CountTest class.
  •  
    本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。

    编辑于

    关注时代Java

    关注时代Java