数组 + 交换 public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); String str = scan.nextLine(); char[] chars = str.toCharArray(); for (int i=0,len = chars.length; i<len/2 ;i++) { char a = chars[i]; ...