14.4 Vector vs ArrayList in Java

preview_player
Показать описание
what is vector?

Vector introduced in jdk 1.0. Vector is type of list which implement list same as array list.
It is dynamic array in which you can increased size of array. vector increased size by 100%.

what is difference between ArrayList and Vector?
Vector : 1) when exceed array limit it will increased capacity by 100%. It waste lots of memory.
2) Vector is thread safe.
3) It is slow.

ArrayList : 1) when exceed array limit it will increased capacity by 50%. It save memory.
2) ArrayList is not thread safe.
3) It is fast.

For more details, watch this video.

Follow on Facebook:

Subscribe to our other channel:
Telusko Hindi :

Follow on Facebook:

Subscribe to our other channel:
Telusko Hindi :

Subscribe to the channel and learn Programming in easy way.

Рекомендации по теме
Комментарии
Автор

I don't know why people teach vector in college.... priceless.

ArturoVillela
Автор

Thank you very much. I am Spanish speaking, however, even though I do not speak English well .. your videos are always helpful. You are awesome jeje. Saludos desde Jujuy Argentina!!

luiszapana
Автор

Excellent content and presentation style as always..

sagarnayak
Автор

Well done explained ! Keep on ! Thank you.

vladanulardzic
Автор

Array List wins and you win our hearts
JAVA ALIEN

EatCodeTravel
Автор

Thank you very much..You have made it easy to understand.

srijakukutapu
Автор

Key takeaways

1. Vectors increases the capacity by 100% while ArrayList increases the capacity by 50%.
2. ArrayList are faster in comparison to Vectors.
3. All in all, both are dynamic arrays.

aabid
Автор

Thank You So Much Praveen Reddy Sir for this amazing

stith_pragya
Автор

capacity of ArrayList not increased by only 50%
instead it increased by 50% + 1
ex- if initial size is 100 then final is 151.

surajtiwari
Автор

Hi sir, when u say thread safe what advantages do u expect there

angelsdemons
Автор

Thank you sir, could you please make video on keyboard shortcuts for Eclips ...? A humble request thanks @Telusko

abdullahnoori
Автор

Hi, can you create an video about- time complexity and space complexity of algorithm.

vijaybhatt
Автор

so theoretically it is thread safe but not practiaclly because it is also affected by threads so it says it's thread safe but not practiaclly but theori what

worldsuckss
Автор

Thank you sir... I had huge confusion.. u vanished it

ketank
Автор

Arraylist and vector ki fight dekne mein maja aaya

vanshajgoel
Автор

Thank you again. In the Java API there is no such information that an arraylist increases its capacity by 50% once the initial capacity is exceeded. I'm curious where you got that data from?. Saludos nuevamente desde Argentina..!

luiszapana
Автор

i made school project in java netbeans when i opened the project on school desktop .. the design size increase automatically. guid me how to solve this probelm

sangamtenthouse
Автор

please teach shortcuts like how to comment at once all, shortcuts like how you imported classes -i.e ctrl+shift+o..i learned from u this shortcut

SangeetaGupta-ovrq
Автор

If Collection does not work with index no. so how it is removing data from index no.??

Ravikumar-oewx
Автор

How can we use iterator and enumeration here ?

purva