How to convert a string obtained from an input stream into an integer in java?
Hello, you have changed your BufferedReader br = ... Make a sentence with ...
Scanner? sc? =? New? Scanner (system. in); Scanner is a tool class provided by java, which is particularly easy to use. For example, you need to enter an integer:
int order = sc . nextint();
Just do it, you don't need to convert it yourself.