Scanner Scanner str = new Scanner(System.in); String num = sc.next();//獲取String int num = sc.nextInt();//獲得int