package ChatExtends;
import java.util.ArrayList;
public class Encryted {
private static String StartPass;
private static String TranSit;
private static String EndPass;
public static void e1(String i) {
StartPass = i;
char[] c = i.toCharArray();
ArrayList<String> end = new ArrayList<>();
ArrayList<String> s = new ArrayList<>();
for(int f = 0;f < c.length ; f++) {
s.add(String.valueOf(c[f]));
}
ArrayList<String> a = new ArrayList<>();
for (int n = 0; n < 10; n++) {
a.add(String.valueOf(n));
}
ArrayList<String> letter = new ArrayList<>();
for(int x = 92;x <=122;x++) {
letter.add(String.valueOf((char)x));
letter.add(String.valueOf((char)x).toUpperCase());
}
for(int k = 0;k < c.length;k++) {
if(Character.isLetter(c[k])) {
int f = letter.indexOf(c[k]);
if(f > 0) {
if(f-8 > 0) {
end.add(letter.get(f-8));
}
} else if(f == 0) {
end.add(String.valueOf(f+1));
}
}
else if(Character.isDigit(c[k])) {
int b = a.indexOf(String.valueOf(c[k]));
int j = 1;
for(int v = 1;v <= b; ++v) {
j *= v;
}
if(j < 26) {
end.add(letter.get(j));
} else {
end.add(String.valueOf(j));
}
}
}
TranSit = end.toString();
System.out.println(TranSit);
}
}
为什么这段代码在i为任何值时,输出结果均为[, ], _, h]呢