Afrikaans
Akan
Albanian
Amharic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
1 1
(bright music) 2
2
(light typing) 3
3
In this section, 4
4
we're going to look at lists. 5
5
The list is an abstract data type and in the next video, 6
6
we're going to go over what an abstract data type is. 7
7
So a list isn't a concrete data structure, 8
8
it's an abstract data type. 9
9
And when it comes to abstract data types, 10
10
normally there's an interface involved 11
11
and list is no exception. 12
12
In Java, the lists that we're gonna look at in this section 13
13
all implement the java.util.list interface, 14
14
so that's what I have on this screen. 15
15
Classes that implement the list interface represent 16
16
an ordered collection also known as a sequence. 17
17
There are quite a few classes that implement list. 18
18
We're not gonna look at all of them. 19
19
We are gonna look at a few. 20
20
We're gonna look at array list. 21
21
We're going to look linked list. 22
22
We'll look at those two in this section. 23
23
We're also gonna look at vector. 24
24
There's also an abstract list class 25
25
and an abstract sequential list. 26
26
If you want to implement the list interface, 27
27
you want to create a custom implementation 28
28
rather than starting with list itself and implementing that, 29
29
it's a good idea to instead extend abstract list 30
30
and abstract sequential list 31
31
because there are scoledo implementations 32
32
of the list interface and so they kind of give you 33
33
a head start and all you have to do is override the methods 34
34
that you specifically want to implement 35
35
if you want custom behaviour. 36
36
So if you are going to implement a custom list, 37
37
its a good idea to extend one of these two classes. 38
38
So lets just look at a few of the methods in here. 39
39
You'll see we have add, so we can add items to the list. 40
40
We can check to see whether a list contains an object. 41
41
We can get an object from the list if we have its index. 42
42
We can find the index of an object in the list. 43
43
We can check whether a list is empty. 44
44
We can remove objects from the list. 45
45
We can find out using the size method 46
46
how many items are in the list 47
47
and we can get the array that's backing a list 48
48
and we're gonna see what that means 49
49
in the next couple of videos. 50
50
Now some of the classes we're gonna look at in this section, 51
51
like array list, you've probably worked with before. 52
52
Array list is a really popular class 53
53
but we're gonna dig a little deeper. 54
54
We're gonna actually look at some of the array list code 55
55
to see what's going on under the covers. 56
56
Okay, so when we're dealing with lists, 57
57
we're dealing with an ordered sequence, 58
58
so the data is organised sequentially 59
59
just as it is in an array and we're gonna see 60
60
in a couple of videos that a popular way to implement 61
61
the list interface is to use an array. 62
62
So let's move on now and take a quick look 63
63
at what an abstract data type is. 64
64
I'll see you in the next video.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.