Java 快读模板

import java.io.*;

public class Main {
    static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    public static void main(String[] args) throws IOException {
        int a = Input.nextInt();
        double b = Input.nextDouble();
        String str = Input.readLine();
        out.println(a);
        out.println(b);
        out.println(str);
        out.flush();
    }
}

class Input {
    static StreamTokenizer streamTokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    static BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));

    static String readLine() throws IOException {
        return bufferedReader.readLine();
    }

    static double nextDouble() throws IOException {
        streamTokenizer.nextToken();
        return (double) streamTokenizer.nval;
    }

    static int nextInt() throws IOException {
        streamTokenizer.nextToken();
        return (int) streamTokenizer.nval;
    }
}
全部评论

相关推荐

头像
08-23 22:25
门头沟学院 Java
点赞 评论 收藏
分享
09-29 16:18
门头沟学院 Java
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务