java中輸入變數的方法

import java.util.*;

public class aaa {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Object i = sc.next();
System.out.println("i is "+ i);
}
}

沒有留言: