Java Scanner delimiter() MethodThe delimiter() is a method of Java Scanner class which is used to get the Pattern which the Scanner class is currently using to match delimiters. SyntaxFollowing is the declaration of delimiter() method: ParameterThis method does not accept any parameter. ReturnsThe delimiter() method returns the Pattern which the Scanner class is using. ExceptionsNA Compatibility VersionJava 1.5 and above Example 1Output: Hello! This is JavaTpoint. \p{javaWhitespace}+ Example 2Output: Delimiter: \p{javaWhitespace}+ Hello World! Example 3Output: Enter Your Number: 4354655 Delimiter:\p{javaWhitespace}+ Number: 4354655 Scanner Closed. Next TopicJava-scanner-findinline-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