Home  >  Forum  >  Core Java
Post New Query

java.lang.UnsupportedOperationException at java.util.AbstractList.add

joined on
March 16,2013
Asked on May 16,2013
Hi Friends,

I am using Arrays.asList and in returned list I am adding data by
list.add and got the below error.

Exception in thread "main" java.lang.
at java.util.AbstractList.add(Unknown Source)
at java.util.AbstractList.add(Unknown Source)
at com.util.AsListDemo.main(AsListDemo.java:13)

joined on
April 07,2013
Replied on May 16,2013

List obtained by Arrays.asList is of fixed length. We cannot add
element by add method.

Write Answer

Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us