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

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -