返回列表 發帖
本帖最後由 王秉鈞 於 2022-12-17 20:48 編輯
  1. import java.io.*;
  2. public class Ch47 {

  3.         public static void main(String[] args) {
  4.        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  5.        String str;
  6.        int n;
  7.      
  8.       
  9.       Ch47() throws Exception
  10.      {
  11.              System.out.print("please enter a string(with white space)");
  12.              str=br.readLine();
  13.              System.out.println(str);
  14.              System.out.print("please enter an INT");
  15.              n=Integer.parseInt(br.readLine());
  16.              System.out.println(n);
  17.      }
  18.        public static void main(String[] args)throws Exception{
  19.                new Ch100();
  20.        }

  21.         }

  22. }
複製代碼

TOP

返回列表