All language subtitles for 010 Doc Comments_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

Documents can be used to describe what a function does in the past three workbooks, LFG documents to

guide your code, and this one is from Workbook four point three.

Notice how easy it is to read, because very succinctly, it tells you exactly what the function does,

what the parameters are and what the function returns.

If you're working in a team of developers, you should have a document for every function, it helps

collaborators understand what your function does without having to read your code.

So in this lesson, you're going to learn how to write documents.

First thing I need you to do is create a new class by yourself inside the section for project, create

a new file named Comments Java and make sure the class has a main method.

So we're going to start off by writing a function.

Inside documents generate a random function that void.

I'm going to call that Grete.

And it's just going to print high.

And just before the function, I'm going to write slash star star.

And press enter a few times, and Java creates a skeleton first threat, a dark comment next to the

first hour, I'm going to write function name.

Which is Grete.

And beside the last hour, I'm going to write inside the function.

Followed by a bullet point that describes what it does and it prints hi.

There you go.

This document effectively describes whatever function does.

Now we're going to write a function with parameters.

Public static.

It's going to be void and I'm going to call it print text.

And it's going to receive, too, string parameters, name and age.

And inside the function, I'm going to print high.

I'm.

Whatever name value was Pastan.

And whatever age value is Pastan.

Years old.

And now, once again, before the function, I'm going to write Star Star.

Press enter a few times and check it out, it recognizes the two parameters in my function.

And now this is just the preference, but in brackets, I'm going to add the data type of each parameter,

so the name parameters of type string.

And the parameter is of type string as well.

Now, like before, right, the function name beside the first star.

And describe the function beside the last hour, so we'll say inside the function.

Colin.

I'm going to add a bullet point that says this function prince, the name and age is part of a text.

Now we're going to read a function where they return value and documenter.

I'm going to make a function that returns a double.

I'm going to call it calculate area.

And it's going to receive two parameters, length and what?

And inside the function, I'm going to calculate the area of a rectangle by multiplying the length and

width values that are passed in.

And then I'm going to return the area value.

And once again, right before the function, I'm going to write Star Star.

Press enter a few times and check it out this time it recognizes the parameters and that you have a

return value.

And you know me, I like the data type of each thing in brackets.

The parameters are all of type double.

And the return value as a double as well.

As always, I would add the function name.

And next to the last hour, I'm going to describe the function by saying inside the function.

And then I'll add a bullet point that says this function calculates the area and returns.

That's all pretty easy, isn't it?

All you have to do is press star, star a few times and Java creates a skeleton that we can use to fill

out and document our function.

In this lesson, you learn to describe functions using Javadoc when you write Star, a star followed

by Enter Jova generates the format and all you have to do is write the function name, give a small

description, and if you want to get super fancy, write the type of each thing in brackets.

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