解决方案一般思路 import java.util.Scanner; public class LastWordLength { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String input = sc.nextLine(); // 读取输入的字符串 String[] words = input.split(" "); // 将字符串分割成单词数组 System.out.println(words[words.length - 1].length()); /...