标签:png void ima alt system package main sys min
package Month.JUL.JUL11; public class XuanMing { static int num = 0; private String name; public XuanMing() {} public XuanMing(String name) { this.name = name; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
package Month.JUL.JUL11; public class TestXuanMing { public static void main(String[] args) { int i = 0; do { XuanMing x1 = new XuanMing("A" + (i + 1)); XuanMing.num++; System.out.println("第" + (i + 1) + "个投票的人姓名:" + x1.getName()); i++; } while (XuanMing.num < 100); System.out.println("当前投票总数为:" + XuanMing.num + ",投票结束!"); } }
标签:png void ima alt system package main sys min
原文地址:https://www.cnblogs.com/zeng1997/p/11169149.html