Java Scanner ioException() MethodThe ioException() is a method of Java Scanner class which is used to get the IOException last thrown by this Scanner's readable. It returns null if no such exception exists.. SyntaxFollowing is the declaration of ioException() method: ParameterThis method does not accept any parameter. ReturnsThe ioException() method returns the last exception thrown by this scanner's readable. ExceptionsNA Compatibility VersionJava 1.5 and above Example 1Output: Hello World! Hello JavaTpoint. Exception Output: null Example 2Output: ;Pawan;Suresh Exception Output: null
Next TopicJava Scanner Class
|