标签:
import java.util.Random; public class choujiang { public static void main(String[] args) { int[] shuzu=new int[8]; Random ran=new Random(); for(int i=0;i<shuzu.length;i++) { shuzu[i]=ran.nextInt(36); for(int j=0;j<i;j++) { if(shuzu[i]==shuzu[j]) { i--; } } } for(int i=0;i<shuzu.length;i++) {System.out.println(shuzu[i]);} }}
标签:
原文地址:http://www.cnblogs.com/chouji717/p/5872653.html