All language subtitles for 1. Introduction to Lists

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic Download
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 1 00:00:00,212 --> 00:00:02,716 (bright music) 2 2 00:00:02,716 --> 00:00:05,310 (light typing) 3 3 00:00:05,310 --> 00:00:06,143 In this section, 4 4 00:00:06,143 --> 00:00:08,080 we're going to look at lists. 5 5 00:00:08,080 --> 00:00:12,530 The list is an abstract data type and in the next video, 6 6 00:00:12,530 --> 00:00:16,510 we're going to go over what an abstract data type is. 7 7 00:00:16,510 --> 00:00:19,270 So a list isn't a concrete data structure, 8 8 00:00:19,270 --> 00:00:21,150 it's an abstract data type. 9 9 00:00:21,150 --> 00:00:23,140 And when it comes to abstract data types, 10 10 00:00:23,140 --> 00:00:25,130 normally there's an interface involved 11 11 00:00:25,130 --> 00:00:27,360 and list is no exception. 12 12 00:00:27,360 --> 00:00:30,820 In Java, the lists that we're gonna look at in this section 13 13 00:00:30,820 --> 00:00:34,410 all implement the java.util.list interface, 14 14 00:00:34,410 --> 00:00:36,500 so that's what I have on this screen. 15 15 00:00:36,500 --> 00:00:39,550 Classes that implement the list interface represent 16 16 00:00:39,550 --> 00:00:42,950 an ordered collection also known as a sequence. 17 17 00:00:42,950 --> 00:00:45,630 There are quite a few classes that implement list. 18 18 00:00:45,630 --> 00:00:47,100 We're not gonna look at all of them. 19 19 00:00:47,100 --> 00:00:48,880 We are gonna look at a few. 20 20 00:00:48,880 --> 00:00:50,870 We're gonna look at array list. 21 21 00:00:50,870 --> 00:00:53,870 We're going to look linked list. 22 22 00:00:53,870 --> 00:00:55,670 We'll look at those two in this section. 23 23 00:00:55,670 --> 00:00:57,240 We're also gonna look at vector. 24 24 00:00:57,240 --> 00:00:59,620 There's also an abstract list class 25 25 00:00:59,620 --> 00:01:01,880 and an abstract sequential list. 26 26 00:01:01,880 --> 00:01:05,440 If you want to implement the list interface, 27 27 00:01:05,440 --> 00:01:08,000 you want to create a custom implementation 28 28 00:01:08,000 --> 00:01:12,420 rather than starting with list itself and implementing that, 29 29 00:01:12,420 --> 00:01:15,450 it's a good idea to instead extend abstract list 30 30 00:01:15,450 --> 00:01:16,970 and abstract sequential list 31 31 00:01:16,970 --> 00:01:19,450 because there are scoledo implementations 32 32 00:01:19,450 --> 00:01:21,520 of the list interface and so they kind of give you 33 33 00:01:21,520 --> 00:01:25,320 a head start and all you have to do is override the methods 34 34 00:01:25,320 --> 00:01:27,570 that you specifically want to implement 35 35 00:01:27,570 --> 00:01:29,270 if you want custom behaviour. 36 36 00:01:29,270 --> 00:01:32,760 So if you are going to implement a custom list, 37 37 00:01:32,760 --> 00:01:35,500 its a good idea to extend one of these two classes. 38 38 00:01:35,500 --> 00:01:39,000 So lets just look at a few of the methods in here. 39 39 00:01:39,000 --> 00:01:43,160 You'll see we have add, so we can add items to the list. 40 40 00:01:43,160 --> 00:01:47,260 We can check to see whether a list contains an object. 41 41 00:01:47,260 --> 00:01:51,690 We can get an object from the list if we have its index. 42 42 00:01:51,690 --> 00:01:54,190 We can find the index of an object in the list. 43 43 00:01:54,190 --> 00:01:56,273 We can check whether a list is empty. 44 44 00:01:57,350 --> 00:01:59,580 We can remove objects from the list. 45 45 00:01:59,580 --> 00:02:01,870 We can find out using the size method 46 46 00:02:01,870 --> 00:02:03,500 how many items are in the list 47 47 00:02:03,500 --> 00:02:07,750 and we can get the array that's backing a list 48 48 00:02:07,750 --> 00:02:09,640 and we're gonna see what that means 49 49 00:02:09,640 --> 00:02:11,470 in the next couple of videos. 50 50 00:02:11,470 --> 00:02:15,500 Now some of the classes we're gonna look at in this section, 51 51 00:02:15,500 --> 00:02:17,990 like array list, you've probably worked with before. 52 52 00:02:17,990 --> 00:02:20,470 Array list is a really popular class 53 53 00:02:20,470 --> 00:02:21,830 but we're gonna dig a little deeper. 54 54 00:02:21,830 --> 00:02:24,100 We're gonna actually look at some of the array list code 55 55 00:02:24,100 --> 00:02:26,280 to see what's going on under the covers. 56 56 00:02:26,280 --> 00:02:29,120 Okay, so when we're dealing with lists, 57 57 00:02:29,120 --> 00:02:32,020 we're dealing with an ordered sequence, 58 58 00:02:32,020 --> 00:02:33,970 so the data is organised sequentially 59 59 00:02:33,970 --> 00:02:36,610 just as it is in an array and we're gonna see 60 60 00:02:36,610 --> 00:02:40,430 in a couple of videos that a popular way to implement 61 61 00:02:40,430 --> 00:02:42,730 the list interface is to use an array. 62 62 00:02:42,730 --> 00:02:44,820 So let's move on now and take a quick look 63 63 00:02:44,820 --> 00:02:46,860 at what an abstract data type is. 64 64 00:02:46,860 --> 00:02:48,410 I'll see you in the next video. 5601

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.