Java Scanner reset() MethodThe reset() method of Java Scanner class is used to reset the Scanner which are in using. The resetting of scanner discards all of its explicit state information. SyntaxFollowing is the declaration of reset() method: ParameterThis method does not accept any parameter. ReturnsThe reset() method reurns the Scanner which are in using. ExceptionsNA Compatibility VersionJava 1.6 and above Example 1Output: 1: is 2: a 3: JavaTpointThis 4: is 5: a 6: JavaTpoint Example 2Output: Hello Java 10 + 10 = 20.0 false Default Radix: 10 en_IN Next TopicJava-scanner-skip-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India