Method threw 'java.lang.UnsupportedOperationException' exception. code example
Example 1: exception in thread "main" java.lang.unsupportedoperationexception: not supported yet.
exception in thread "main" java.lang.unsupportedoperationexception: not supported yet.
Example 2: java.lang.UnsupportedOperationException
From the API:
'Arrays.asList': Returns a fixed-size list backed by the specified array.
You cant add to it.
You cant remove from it.
You cant structurally modify the List.
Create new instance of any type that implement List interface,
pass Arrays.asList(...) to parameter:
List<String> list = new LinkedList<String>(Arrays.asList(split));