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 / arraylist

arraylist

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

2018 2022 about app apparment arraylist blog book books condo date db errors gifts hibernate ideas inspiration java java.util.List jboss linux List mongodb MongoRepository MongoTemplate motivation mysql netstat oracle port productivity real estate reviews school Seth Godin sql String struts students The 100 days project The Practice to_date wedding welcome windows

Recent Comments

  • kevin on Oracle have no Boolean, how to fix this

Calendar

May 2022
MonTueWedThuFriSatSun
 1
2345678
9101112131415
16171819202122
23242526272829
3031 
« Apr  

Archives

  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • March 2021
  • February 2021
  • May 2020
  • January 2019
  • December 2018
  • July 2018
  • April 2018
  • January 2018
  • October 2014
  • September 2014
  • August 2014

Copyright © 2022 Some Trials & a lot of Errors.

Powered by WordPress and Hybrid.