This method is called by the ++ operator for the class String. It increments the last character in the given String.
Syntax
String next()
Parameters
None
Return Value
The new value of the string
Example
Following is an example of the usage of this method −
class Example { static void main(String[] args) { String a = "Hello World"; println(a.next()); } }
When we run the above program, we will get the following result −
Hello World
Previous Page:-Click Here
Pingback: Groovy - Strings - Adglob Infosystem Pvt Ltd
Really enjoyed this blog post. Fantastic.