Program to convert Java list of strings to a String in Scala
A java list of strings can be converted to a String in Scala by utilizing toString method of Java in Scala. Here, you need to import Scala’s JavaConversions object in order to make this conversions work.
Now, lets see some examples and then discuss how it works in details.
[geeks, for, geeks]
Here, the duplicate elements are not eliminated and the resultant order of the elements in list is same as stated above.
[I, am a, writer]
Here, the stated list is not in correct order so, the resultant output is also not in proper order.