核心代码块:Arrays.sort(arr, String::compareTo); import java.util.Arrays; import java.util.Scanner; /** * @author * Created by Administrator on 2022-05-06 03:55 */ public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext())...