•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 455,985 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,801 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 960 | Replies: 4
![]() |
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation:
Rep Power: 19
Solved Threads: 200
•
•
Join Date: Dec 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 1
Well in relation to threads, I major difference is that a Vector is synchronized and an ArrayList is not synchronized. What this means is, if two threads attempt to access a
Vector it will be synchronized. One thread will have to wait until the
other thread is finished accessing the Vector. With an ArrayList you have
to create wrappers to synchronize access to the ArrayList or you will have
undefined behaviour.
Also:
http://forum.java.sun.com/thread.jsp...sageID=4136184
Vector it will be synchronized. One thread will have to wait until the
other thread is finished accessing the Vector. With an ArrayList you have
to create wrappers to synchronize access to the ArrayList or you will have
undefined behaviour.
Also:
http://forum.java.sun.com/thread.jsp...sageID=4136184
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation:
Rep Power: 19
Solved Threads: 200
•
•
•
•
may be it is a legacy class. but I was asked both the questions in Interview.
That is why I need to know the answers.
If you were asked that in a job interview and didn't know the answer they're right to fail you.
If you applied for a job where you should know the answer and you not only don't know it but don't know where to find it (and it's easy to find, everyone should know who's programmed in Java for more than a day or so) you don't deserve any job at all.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Java Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- ArrayList is best ,why (JSP)
- How to add a vector content in to the hashtable as a value (Java)
- Using operator[] with an ArrayList (Java)
- Vectors Versus Arrays (Java)
- Is ArrayList Better than Vector (Java)
Other Threads in the Java Forum
- Previous Thread: generics in java
- Next Thread: no default server available while configuring eclipse for application server



Linear Mode