返回列表 發帖
  1. import java.unti.Arrays
  2. public class Ch18
  3. {
  4.     public static void main(String args[])
  5.     {
  6.       Scanner s=new Scanner(System.in);
  7.       String str1, str2;
  8.       int a;
  9.       float b;
  10.       System.out.print("請輸入一字串(帶空白)");
  11.       str1=.nextline();
  12.       System.out.print("請輸入一字串(不帶空白)");
  13.       str2=.next();
  14.       System.out.print("請輸入整數");
  15.       a=s.nextInt();
  16.       System.out.print("請輸入一浮點數:");
  17.       b=s.nextfloat();
  18.       System.out.println(b);
  19.     }
  20. }
複製代碼

TOP

返回列表