Or change line 8 to: ... ... Yes, that happens when a value ... is entered for ... , the while loop will keep looping as long as ... , and since the value of ... never changes during loop execution, that will in theory be forever.
In your code there are two blunder mistakes.
1) you can not use InputStreamReader(System.in) directly as a parameter of BufferedReader class.
2) Although i have made corrections in your code but even then it is running for infinite
Here is the modified lines of code :
public static void main(String args) throws IOException
InputStreamReader ir=new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(ir);
its correct, it just doesn't make any sense. it 'll cause the loop never to be executed, but if that's what the OP was going for ...
(although I suspect he may have intended the second 0 to actually be his o variable)