本帖最後由 王秉鈞 於 2022-12-17 20:48 編輯
- import java.io.*;
- public class Ch47 {
- public static void main(String[] args) {
- BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
- String str;
- int n;
-
-
- Ch47() throws Exception
- {
- System.out.print("please enter a string(with white space)");
- str=br.readLine();
- System.out.println(str);
- System.out.print("please enter an INT");
- n=Integer.parseInt(br.readLine());
- System.out.println(n);
- }
- public static void main(String[] args)throws Exception{
- new Ch100();
- }
-
- }
- }
複製代碼 |