List<Integer> list = new ArrayList<Integer>();
int[] nums = { 1, 2, 3, 4 };
for (int x = 0; x < nums.length; x++) {
String q = nums[x] + "";
for (int i = 0; i < nums.length; i++) {
String h = nums[i] + "";
for (int j = 0; j < nums.length; j++) {
String s = nums[j] + "";
for (int z = 0; z < nums.length; z++) {
String g = nums[z] + "";
String letter = q + h + s + g;
list.add(Integer.valueOf(letter));
}
}
}
}
for (Integer i : list) {
System.out.print(i + ",");
}
追é®è¿ä¸ªæ¯ç¨javaçç±»ä¸å¯¹è±¡åçï¼è½ä¸è½åååºæ¬ç¹ãææç¹çä¸æãä¸ä¸ã