返回列表 發帖
  1. import java.util.Scanner;
  2. public class Workinghehe {

  3.         public static void main(String[] args) {
  4.                 // TODO 自動產生的方法 Stub


  5.                 Scanner c = new Scanner(System.in);
  6.                 String str1,str2;
  7.                 System.out.print("輸入字串一");
  8.                 str1=c.nextLine();
  9.             System.out.print("字串一"+str1);
  10.             
  11.             System.out.print("輸入字串二");
  12.                 str2=c.nextLine();
  13.                 System.out.print("字串二"+str2);         
  14.                                
  15.         }

  16. }
複製代碼

TOP

返回列表