Program to convert Java list of characters to a String in Scala
A java list of characters 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.
[l, m, n]
Here, the duplicate elements are eliminated and the resultant order of the elements in list is same as stated above.
[d, b, c]
Here, the stated list is not in correct order so, the resultant output is also not in proper order.