标签:system .com img png ati oid vat ring src
package ke2; public class Genzong { private static int n = 0; public Genzong() { n++; } public static int GetNum() { return n; } public static void main(String[] args) { Genzong n1=new Genzong(); Genzong n2=new Genzong(); Genzong n3=new Genzong(); Genzong n4=new Genzong(); Genzong n5=new Genzong(); Genzong n6=new Genzong(); System.out.println("已生成对象个数:"+Genzong.GetNum()); } }
标签:system .com img png ati oid vat ring src
原文地址:https://www.cnblogs.com/zlc364624/p/9825172.html