In this section, we will discuss the previous() method in groovy.
Syntax
String previous()
Parameters
None
Return Value
This method returns the resulting String.
Example
Following is an example of the usage of this method −
class Example { static void main(String[] args) { String a = "Hello"; println(a.previous()); } }
When we run the above program, we will get the following result −
Helln
Previous Page:-Click Here
Pingback: Groovy - Strings - Adglob Infosystem Pvt Ltd