SaravanaKumar Venugopal wrote:Thanks for the prompt response Keith Lynn
Am sorry the code was like given below and it thrown UnsupportedOperationException and when I googled it has been said as when we convert to list by Arrays.asList() which will return fixed size of list and when we try to modify we will be getting UnsupportedOperationException. And there is no issue with the original post.
String s1 = "Value1,Value2,Value3,Value4";
List<String> lStr1 = Arrays.asList(s1.split(","));