标签:print enter log can scan 结果 system 字符 style
1 public static void main(String[] args){ 2 Scanner scanner = new Scanner(System.in); 3 System.out.println("please enter something:"); 4 String str = scanner.nextLine(); 5 char[] array = str.toCharArray(); //获取字符数组 6 for (int i = 0; i<array.length;i++){ 7 array[i] = (char)(array[i]^2000); 8 } 9 System.out.println("加密结果:"+ new String(array)); 10 }
标签:print enter log can scan 结果 system 字符 style
原文地址:http://www.cnblogs.com/jjlyx/p/7504653.html