今天介紹的Scanner這個類是java 5新增加的類,不僅使用方便,功能更是強大。先來看一個簡單的例子:import java.util.*;
public class ScannerTest {
    public static void main(String[] args){
        Scanner scanner=new Scanner(System.in);
        double a=scanner.nextDouble();

alex0126 發表在 痞客邦 留言(0) 人氣()