Refresh Your Java - Before Java Interview
We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....
Vectors are synchronized. Any method that touches
the Vector's contents is thread safe.
ArrayList,
on the other hand, is unsynchronized, making them, therefore, not
thread safe.
With that difference in mind, using
synchronization will incur a performance hit. So if
you
don't need a thread-safe collection, use the
ArrayList.
A Vector defaults to doubling the size
of its array, while the ArrayList increases its array
size by 50 percent. Depending on how you use these classes, you
could end up taking a large
performance hit while adding
new elements. It's always best to set the object's
initial
capacity to the largest capacity that your
program will need. By carefully setting the capacity,
you can avoid paying the penalty needed to resize the internal
array later.
This Portal is intended to put all Java/J2ee related topics at one single place for quick referance, not only Technical , but also the Project Management Related thing such as Development Process methodoogies build process, unit testing etc.,
This Portal has More than 500 Java Interview Questions (also could be Considered as Quick Notes) very neatly separated topic by topic with simple diagrams which makes you easily understandable. Importantly these are from our Realtime expericance.