Java list vs arraylist

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I love you sir, the minute you showed that it could be any kind of list when using the interface, the lightbulb went off. Thank you!

thosekidds
Автор

i think im finally starting to get it...so ArrayList IMPLEMENTS the List interface

aquilhall
Автор

Thanks. first video that I found about this topic and it acutally helped me!

robertli
Автор

Still not clear.. When is it useful to use the statement
ArrayList a1=new ArrayList() ;
and
List a2=new ArrayList() ;

shreekarshetti
Автор

Great video! Very well explained! Keep it up!

RichieRussell
Автор

thanks for your video. nicely explained. I have one question, why defining an object as an array list instead of list interface is bad?

amitray
Автор

Thanks for the simple and brilliant explanation.

harshag
Автор

What is weird about this and I just noticed watching this, is that you are creating an instance for an interface with a class instance.

Checking documentation found that:
List(interface) extends (Collection(interface) extends Iteratable(interface))
and
ArrayList(class) extends (AbstractList(class) extends (AbstractCollection(class) implements (Collection(interface) extends Iteratable(interface))))

And the only thing they have in common is the implementation of the Collection interface. Is this an example of inheritance? I knew about inheritance via the extends mechanism. But inheritance via interface implementation doesn't make much sense to me. Maybe I'm missing something, never thought about implementing inheritance this way before.

wesosdequeso
Автор

finished my first java course now im onto data structures and am forced to fill in my gaps that i didnt learn in the prerequisite course!

beachwave
Автор

thanks, just came accross what i was looking for

sidikicamara
Автор

Thank you so much! Simple and to the point :)

andrewp.
Автор

So list is like map as hashmap is like arraylist

rashidibrahim
Автор

why do some people use : =new ArrayList<Integer>(); //when defining a new list. is the Integer neccessary

msalam
Автор

So what kind of list ist int [] {1, 2, 3} ? It's not an ArrayList or a LinkedList... so what is it and how is it different from an ArrayList?

sweetandsourapple
Автор

I just want a list of class of list of array list

bfjohnmark
Автор

Esta explicación es muy buena, Saludos desde Argentian, I know you did not understand anything because you don't talk spanish ha ha ha ha.

LucasRock