小编use*_*151的帖子

程序不编译.什么是错误

我试图在命令提示符中运行以下简单代码最近几个小时.仍然无法修复错误.

这里有什么问题.我找不到.

这是代码:

public static void main(String[] args) {
        int i;
        try {
            DataInputStream din = new DataInputStream(System.in);
            i = Integer.parseInt(din.readLine());
        }
        catch(NumberFormatException || IOException exception) {
            System.out.println(exception.getMessage());
        }
}
Run Code Online (Sandbox Code Playgroud)

exception-handling ioexception java-7 numberformatexception

4
推荐指数
1
解决办法
87
查看次数