java - What does Scanner.hasnext() return, if it is called on closed Scanner? -


see example:

scanner s=new scanner(...); s.close(); println(s.hasnext()); 

will command print true or false or show error?

as per java doc of method throws exception.

throws: illegalstateexception - if scanner closed


Comments