All language subtitles for 002 Solution_en 2

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

I hope you had fun building the chat, but if you solve that, you're on fire.

If you had trouble, no worries.

Here's what I did.

First, we have to set up scanner to scan for values.

So I'm going to start by importing scanner from the Java util package.

Then I'm going to say scanner.

Schenn.

Is equal to a new instance of scanner that can receive input from the system system in.

And now the first input needs to be a string, so we're going to use scan next line to pick it up and

then we're going to store whatever the user inputs inside a variable called name string name.

All right, now in the reply, we're going to replace the name Placeholder with the value inside our

variable name.

And now the next input is also going to be a string, so Scandi next line will pick up the next string.

And you're going to store the string input inside the variable home string home and now in the reply,

we can replace the home placeholder with the value inside home.

And now the next input needs to be an integer, so we're going to use scan next and to pick up the next

integer int age is equal to scanned next int.

And now to realize they're going to follow this answer in the first reply.

We're going to replace the age placeholder with the age variable.

And for the second placeholder, we're going to divide the users age from 400.

Now, you might be thinking, whoa, whoa, we're performing a division operation between two integers.

That's not good.

Well, in this case, we don't really care about decimals.

Whether Java board is 20 times or twenty point two times older than me doesn't really matter in this

context.

It would actually be better not to have any decimals.

Now, if you remember in the instructions, I warned you to be careful from the next line trap.

The reason I said this is because we're going to have to use next line to pick up the next string.

But if you put a next line ahead of a next and and next double or a next long, in a way, this next

line is going to get skipped.

Let me show you what I mean.

We're going to say string language is equal to Scandi next line.

And we're going to compile the code.

Put in some values.

Do you see what I mean?

It's almost like the next line is just ignored, it's wasted on something else.

You might be wondering why this happens.

I'll explain what's going on once we cover delimiters in the next section booleans and conditionals.

For now, the simple solution is to add a throwaway next line before the real next line.

That way, the next line that we don't care about gets skipped and we get to use it the next one.

Now, if you test their code, everything should work.

We're going to compile compiler code.

Put in some values.

And there you are, Trappe avoided.

Now, in the next reply, replace the language placeholder with the language variable.

And now, if you followed every instruction, your output should look like this.

Everything runs well, but the output is really messy.

The screaming cat is telling us to add a line of spacing between each answer and reply.

So before I reply, we're just going to add a new line of space, you can do this by adding again at

the beginning of each reply.

And now, after each reply, JAV is going to print a new line before printing the string.

So if we were to honor code now, this is what we'd have.

That being said, I hope you had fun building the chat, but now you're ready for the next section.

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