1.示例
某人的电话号码(网上摘抄的此段)
public class Textone {
public static void main(String[] args) {
int[] arr = new int[]{8,2,1,0,3};
int[] index = new int[]{2,0,3,2,4,0,1,3,2,3,3};
String tel = "";
for (int i=0;i<index.length;i++){
int value=index[i];
tel+= arr[value];
}
System.out.println("联系方式:"+tel);//18013820100
}
}
2.我的邮箱
public class Textone {
public static void main(String[] args) {
int[] arr = new int[]{8,2,1,4,6,3,7,8};//所表达的字符串的全部元素
int[] index = new int[]{2,0,5,1,2,4,6,6,3,7};//实际上,此行数组的元素为arr数组上数字的代号
String EMAIL = "";
for (int i=0;i<index.length;i++){
int value=index[i];
EMAIL+= arr[value];
}
System.out.println("我的邮箱:"+EMAIL+"@qq.com");
}
}