exception handling - Program not compiling. What is the error -
i trying run below simple code in command prompt last few hours. still not able fix error.
what problem here. i'm not able find.
here code:
public static void main(string[] args) { int i; try { datainputstream din = new datainputstream(system.in); = integer.parseint(din.readline()); } catch(numberformatexception || ioexception exception) { system.out.println(exception.getmessage()); } }
need use single |
operator. not ||
.
catch(numberformatexception | ioexception exception)
Comments
Post a Comment