- import java.io.BufferedReader;
- import java.io.IOException;
- import java.io.InputStreamReader;
- public class Ch100 {
-
-
- BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
- String str;
- int n;
- Ch100() throws Exception
- {
- System.out.println("輸入字串 :");
- str=br.readLine();
- System.out.println(str);
- System.out.println("輸入整數 :");
- n=Integer.parseInt(br.readLine());
- System.out.println(n);
-
- }
- public static void main(String[] args) throws Exception {
- new Ch100();
- }
- }
複製代碼 |