返回列表 發帖
  1. import java.io.*;

  2. public class Ch100 {
  3.         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  4.       
  5.         int n;
  6.         String str;

  7.         Ch100() throws Exception {
  8.                 System.out.println("輸入一個字串(帶空白):");
  9.                 str = br.readLine();
  10.                 System.out.println(str);
  11.                 System.out.println("輸入一個整數:");
  12.                 n = Integer.parseInt(br.readLine());
  13.                 System.out.println(n);
  14.         }

  15.         public static void main(String[] args) throws Exception  {
  16.                 new Ch100();
  17.         }
  18. }
複製代碼

TOP

返回列表