LinkedList and the List Interface: Java Collections Framework Tutorial Part 2

preview_player
Показать описание
-------------------------------------------------------------------------------------------------------------------------------------------
IMPORTANT NOTE: I had slightly misunderstood something when making this video, as pointed out to me by "kidbabic" among others. If you add or insert something to a LinkedList by specifying an index, the list has to iterate over all items in itself up to that point in order to find the insertion/deletion point. So adding or removing to LinkedList is only faster if you use an iterator, which you have ready pointing at the correct point.

This is a tutorial on LinkedLists in Java; when to use LinkedList rather than ArrayList, and how to use the List interface.
--------------------------------------------------------------------------------------------------------------------------------------------
Рекомендации по теме
Комментарии
Автор

One of the easiest way to learn Collection, thanks a lot.

KLTravelDiaries
Автор

It contains definitions of methods for working with lists. Check out my beginner's tutorial series if you want an intro to interfaces.

caveofprogramming
Автор

Oh OK. Thanks for quick responses John

jackienguyen
Автор

You have to pick a maximum size when you create an array, but you don't need to know the maximum size in advance when you create a collection.

caveofprogramming
Автор

My guess is just that various other processes are running on your computer.

caveofprogramming
Автор

Just watch this at 1.5x and lock your eyes to the screen. The voice will guide you.

DoomsdaYPunK
Автор

It returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.

karanmurthy
Автор

very helpful for beginners...thank you

abhinavsadhu
Автор

What a pleasure to learn with your classic music ! good and smooth teaching.

michelrwekaza
Автор

That's where Generality starts when you start using Interfaces .
Note that he is using both Array List and Linked List because of this.

myhimalayanchants
Автор

Thanks, a nice explanation I got the gist of List Interface that I wanted to know.

arttech
Автор

which you used in your for loop to populate the list with a loop

vamsiai
Автор

Thankyou so much for making us Better. :-)

sahilrally
Автор

Great tutorial, really helped me, thanks!

KlamotPL
Автор

Could you explain to me, what ES stands for and how
can I use it ?

Said
Автор

That does makes sense .... I never thought about the iteration time!!!

caveofprogramming
Автор

12:30 Isn't adding/removing an item from the middle of the list the same for either ArrayList or LinkedList? Both are linear operations aren't they?
LinkedList: Traversing to the middle starting from the first or last node = O(n)
Adding or removing the element = O(1)
ArrayList: Traversing to the middle = O(1)
Shifting every element after adding new element = O(n)

nicoqueijo
Автор

It's called the "Exponential" form. It's basically a way to represent very large Long or Double types values. It's more convenient than typing which is the same as 1E5, the 5 being the amount of zeros after the initial value "1". Hope that helps.

gabo
Автор

Damn, just read your CV, crazy jealous of your skills/experience. And also you live in Budapest, I love that city. I look forward to your upcoming series on how to master the Hungarian language! In the meantime I'm really enjoying these Java vids, please keep them coming! Have you, or are you planning to do any videos on KeyListeners or Key Bindings? Any more GUI videos in the pipeline? Köszönöm!

AutumnRide
Автор

You made it sooo easy.. Keep up the good work.. :) Thank u

abhinandhan
join shbcf.ru