且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

反转数并消除零

更新时间:2023-02-11 18:11:38

也许可以说出错误是什么。


编译吗?如果没有,编译器消息是什么?你指的代码行是什么?


运行它时会出现意外或意外的行为吗?如果这是一个例外,那么堆栈跟踪是什么?如果没有,输入,预期输出和实际输出是什么?
Perhaps you could say what the error is.

Does it compile? If not, what is the compiler message? And what lines of your code is it referring to?

Does it exhibit unexpected or unintended behaviour when you run it? If this is an exception, what is the stack trace? If not, what was the input, the expected output and the actual output?


这里的错误是:
Here''s what the error says:
展开 | 选择 | Wrap | 行号


这是你最初发布的代码吗?


任何方式,你都不能声明中的变量两次(即作为BufferedReader和DataInputStream)。所以摆脱DataInputStream。这也有助于弃用警告,因为不应使用DataInputStream的readLine()方法。
Is that the code you originally posted?

Any way, you can''t declare the variable in twice (ie both as a BufferedReader and as a DataInputStream). So get rid of the DataInputStream. This will also help with the deprecation warning as the readLine() method of DataInputStream shouldn''t be used.