All language subtitles for 012 Math Operators - Part 2_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
hu Hungarian Download
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

Onwards, the part two in the first video we went through, the first four operators and we saw a very

cool pattern in operation between whole numbers will return a whole number and an operation between

decimals always returns a decimal.

Now you're going to see the very same pattern as we go through the remaining five operators.

And the first one is the modulus operator, which is expressed by the percent sign and what the modulus

does is it returns the remainder of a division.

When you divide two numbers like ten divided by two, what remains is the modulus, in this case, the

modulus from dividing ten by two is zero.

And in Java, the modulus operation involves the dividend and the deviser, this operation will divide

ten by two, but it won't return the result of the division, it returns the remainder.

But why do we care about the remainder?

It's very useful if you want to identify odd or even numbers when you divide an even number by two like

10.

The remainder is zero.

When you divide an odd number by two, the remainder is not zero, which makes five an odd number.

So we can prove this in our code.

We're going to grab the last two strings from the article.

Comment them out and we're going to put them in print statements.

System, dot, dot, dot, print line.

System out print line.

And we'll just put in both string's.

OK, so at the end of the first string, we're going to connect the modulus from dividing 10 by two.

And in the second string will connect the modulus from dividing five by two.

OK, compile the code and run it, and indeed the modulus from the Vining, ten by two is zero, which

makes ten even and the modulus from dividing five by one is not zero, which makes five an odd number.

All right, let's talk about the ad one operator whose symbol is represented by two plus signs and what

this operator does is it increases the value by one.

And this operation is very common for integer variables because suppose you had a counter variable of

type event which starts at zero.

And when you place plus plus next to the variable, it increases the counter value by one doing so three

times.

The counter value ends up being three.

This is pretty straightforward and let's make it official by doing it in code.

So I'll right int counter.

Is equal to zero and will increase the value by one three times countered plus plus.

Counter plus plus.

Encounter plus plus.

Then I'm going to print system.

Dart out front line.

And we'll connect the counter value.

Compile your code.

And sure enough, the counter equals three.

Conversely, the subtract one operator is represented by two minus signs, and it's a role that's a

decrease value by one.

This operation is also common for integer variables because suppose you had a counter variable that

starts at three and when you place minus minus next to the variable, it decreases the value by one.

Do this three times in the counter ends up being zero.

OK, we can try this in Java.

We're going to write counter minus minus.

Counter minus, minus and one more time, counter minus, minus.

We're going to copy and paste the first print statements.

Recompile the code.

Subtracting one three times, as expected, return zero, because the counter starts at three in each

decrement, removes one from the counter value.

All right, let's talk about the ad buy operator, whose symbol is Express's plus equals the ad buy

operator.

What it does is it adds the value on the right and we already use it in the updating variables video.

You saw an example where a bus started with zero passengers.

The plus equals operator was used to update the value by adding nine the value on the right.

And conversely, we also have a tracked by operator, which you've already seen as well, and this one

subtracts the value on the rights.

We also use this in the updating variables video.

So from the same example, the bus dropped off five passengers, then four.

And in both cases, the minus equals operator subtracts the value on the right.

All right, let's recap, we just used every math operator in Java in every math operation follows a

very nice pattern to study.

Math operation between two whole numbers will always return a whole number and then operation between

decimals will always preserve the decimal.

And now I'm going to recap all the operations we looked at so far, and they are the plus operator to

add values, subtraction, to subtract values, multiplication and division, to multiply and divide

values.

The modulus operator returns the remainder of a division.

The add one operator increases the value by one e subtract one operator decreases a value by one, add

by increases in value by adding the number on the right and subtract by decreases a value by subtracting

the number on the rights.

That is all.

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