package a; public class SanWeiOuShu { public static void main(String[] args) {
String str="123456789";
String a,b,c;
int sum=0;
for (int i = 1; i < 9; i+=2) {
a=str.substring(i,i+1);
String str1 = str.replace(a,""); for (int j = 0; j < 8; j++) {
b=str1.substring(j,j+1);
String str2 = str1.replace(b, ""); for (int k = 0; k < 7; k++) {
c=str2.substring(k,k+1);
System.out.print(new Integer(c+b+a)+"\t");
sum+=1;
}
System.out.println();
}
System.out.println();
}
System.out.println("总个数为:"+sum);
} }