public String
join(String separator)
Join the elements of the list using given separator. It
uses toString mehtod of the elements while joining.
HelloWorld.groovy
data = [2, 3, "Krishna", "5", "Hello World"] result = data.join("****") println "result : $result"
Output
result : 2****3****Krishna****5****Hello World
No comments:
Post a Comment