Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
- import java.util.ArrayList;
- import java.util.Collections;
- //Java Synchronized ArrayList
- public class JavaSynchronizedArrayList {
- public static void main(String args[]){
- /*
- * By default, ArrayList object is not synchronized. That means it is not
- * thread safe. We need synchronized ArrayList if it is being modified
- * by multiple threads at a time.
- *
- * To get synchronized ArrayList, use
- * Collections.synchronizedList(List list) method.
- */
- //this will give us synchronized ArrayList object
- ArrayList aListCounter = (ArrayList) Collections.synchronizedList(new ArrayList());
- }
- }

ok not bad
All The Best Deepu....
post some of your innovative
it's good but i want to say
Post new comment