Some Trials & a lot of Errors
I tried a bunch of framework and other language and I usually feel overwhelm when its time to do something real with what I've learned. So that why I created this site, to write my progress and help some noob like me that stumble into the sames problems.
Browse: Home / java.util.List

java.util.List

List Return a java.lang.UnsupportedOperationException when adding or removing a element

By Chris on October 12, 2014

While trying to remove a element after creating a List from a array using the Array.asList(array[]) method I’ve stumbled on that error. java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:131) at java.util.AbstractList.add(AbstractList.java:91) Then I remember this, list created by the Arrays.asList method are immutable Same goes for empty lists. So instead create a arraylist : List<String> list = new ArrayList<String>(Arrays.asList(split));

Posted in java, prog | Tagged arraylist, java, java.util.List | Leave a response

How to synchronize a List in java ? A Vector vs ArrayList Showdown !

By Chris on September 5, 2013

They’re always a question that comeback either in interview or when you are playing old code. Why the hell are they using Vector over arrayList ? Vector is a class that exists since the beginning of java (aka Java 1.0) it’s implement List. It seems to pollute old code and still use programmer that don’t […]

Posted in prog, tips | Tagged arraylist, collections, java, java.util.List, List, synchronization, synchronizedList, vector | Leave a response

Tags

4hww 2018 about addiction arraylist book ClassLoaders date dating db deployment DeploymentException errors hibernate icon ideas j2ee java java.util.List jboss linux List memory motivation mysql netstat oracle port programing quora rest reviews self help soap sql star startup String struts struts tag styleClass tags to_date welcome windows

Recent Comments

  • FastPamela on Hibernate Oracle to MySQL: changing the generator class
  • kevin on Oracle have no Boolean, how to fix this

Calendar

February 2019
MonTueWedThuFriSatSun
« Jan  
 123
45678910
11121314151617
18192021222324
25262728 

Archives

  • January 2019
  • December 2018
  • July 2018
  • April 2018
  • January 2018
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • November 2013
  • September 2013
  • August 2013
  • July 2013

Copyright © 2019 Some Trials & a lot of Errors.

Powered by WordPress and Hybrid.