返回列表 發帖
  1. import java.util.Scanner;


  2. public class Hihi {

  3.         public static void main(String[] args) {
  4.                 // TODO 自動產生的方法 Stub
  5.                 {
  6.                                
  7.                         Scanner c=new Scanner(System.in);
  8.                                 String str1,str2;
  9.                         System.out.print("輸入字串一:");
  10.                         str1=c.nextLine();
  11.                         System.out.println("字串一:"+str1);
  12.                         System.out.print("輸入字串二:");
  13.                         str2=c.nextLine();
  14.                         System.out.println("字串二:"+str2);
  15.                         }

  16.                 }

  17.         }
複製代碼

TOP

返回列表