使用道具 举报
Post by luoyong GetRandom.java public class GetRandom { public static void main(String args[]) { String distros[]={ "Fedora", "Slackware", "SUSE", "Debian", "Arch", "Ubuntu", "Gentoo", "Mandriva" }; System.out.println(distros[(int)((Math.random()*100)%(distros.length))]); } } 复制代码
本版积分规则 发表回复 回帖后跳转到最后一页