模拟生成手机号

public static void main(String[] args) { for(int j = 0; j <= 99999999; j++) { String phone = getHourFreq(j+""); if(j % 10000 == 0) { System.out.println(186+phone); } } }public static String getHourFreq(String str) { byte[] hourArray = new byte[8-str.length()]; return bytesToString(hourArray)+str; }private static String bytesToString(byte[] bArray) { StringBuffer sb = new StringBuffer(); for (byte b : bArray) { sb.append(b); } return sb.toString(); }

【模拟生成手机号】

    推荐阅读