加密解密
import java.util.Scanner;
public class Triangle {
public static void main(String[] args){
Scanner scan=new Scanner(System.in);//创建扫描器
System.out.println("enter string:");
String password=scan.nextLine();//用户输入
char[] array=password.toCharArray();//获取字符数组
for(int i=0;i<array.length;i++){
array[i]=(char)(array[i]^20000);//异或
}
System.out.println("加密或解密:");
System.out.println(new String(array));
}
}