package wanzai; import java.util.*; public class Suijishu { public static void main(String[] args) { String str="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; Random ran=new Random(); for(int i=0;i<4;i++) { int j=ran.nextInt(str.length()-1); String s=str.substring(j, j+1); System.out.print(s); } } }
时间: 2024-10-01 04:29:44