All language subtitles for 031 toString_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
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
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

Original subtitles

The dealership clerk should have a two string method as well.

I showed you that two string makes it easy to print every field and the current object.

When you had to string to your class, Java internally calls it when you're printing the object.

When we print the dealership, it would be nice to display every car in the dealership.

So in this lesson, you're going to have to string method to the dealership class.

Like before, the two string method is going to be public and return to string value.

It's really important that you follow the signature exactly so that Gever recognizes it as the two string

method that it needs to call.

And this method is going to return a strong representation of every car and the dealership.

So first I'm going to set a temporary variable equal to an empty string and I'll return it's.

Then a for loop is going to run through the entire length of the car's array.

You can choose to put this or not.

It doesn't matter, Javin knows that you're referring to the field cars because it's the only thing

within scope.

But you know me, I like to always include this keyword when referring to a field.

And during each run, we're going to update the string to describe every parking spot, so I'm going

to set temp equal to itself, plus the words parking spot.

Followed by the current index that we're running through.

As well as a new line for aesthetic purposes.

Ultimately, this group is going to run three times and each time it's going to append the current parking

spot that we're running through.

For now, I'm going to test this code by printing the dealership object.

And as expected, printing an object automatically calls its two string method, in this case the two

string method for dealership runs and returns a string that describes every parking spot.

And now remember that each car object also has a two string method as well that describes all of its

fields'.

So during each run, right after we describe the current spot, we're going to add the two string value

of the current car that we're running through.

So we're going to update the string variable to include the two string description of each car object.

Once again, I'm also going to add a new line for aesthetic purposes.

So we should expect that during each run, the temp variable is going to update with the parking spot

and the two string description of the car parked at that spot.

It's going to repeat this three times until I restring.

Variable describes every parking spot and the car that's parked in it.

All right, let's run the code.

And we get a no, a exception, but remember that the third object in the car is array is No.

The for loop effectively grabs the string representation of the first and second objects.

However, the third spot in the area is no, and you can't access or call anything from Intel, Java

is going to crash.

So inside the loop, we need to check if an object is null before attempting to use its two string,

if the current element that the loop is running.

There was no.

Then we're going to update the string to say empty for that parking spot.

Otherwise, if there is an object at that element, we can append its two string.

That's the run your code.

And this is great, the first two elements aren't empty, but the one in index two is.

By printing the object, Jova calls the two string method, which returns a string that effectively

displays every car in the array.

All right, we're officially done programming the car and dealership class, there's still one little

thing we have to fix, but in the end we blueprinted every field action and we added the necessary getters,

setters and to strength.

And now we can effectively program using car and dealership objects.

All of these options are going to come together and form a beautiful application once we add user input.

So for now, let's remove all the function calls.

In this lesson, you added a two string method to the dealership class, the tutoring method for dealership

effectively returns every object in the car's array.

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