Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Every class with fields needs getters and setters.
A child class can inherit methods from its parent class.
So in this lesson, your child class is going to inherit getters and setters from its parent class.
We're going to use the Java code generator to generate the getters and setters, we'll do it for product.
Pense.
Then Schertz.
Pretty simple.
And now from short notice that we can automatically access so many getters and setters.
But wait, we didn't define any of those methods in the short class.
So where did they come from?
These methods came from the product class because shirt and pants inherit every field and method from
their parent.
I'm going to get the price of the shirt.
And run the debugger.
The price is five ninety nine, and here I can step in to get price.
It calls to get price method, this points to the current object that's calling this method.
So the stock price returns the price of that object.
Now will set the price of the pants equal to nine 999.
Run the debugger.
Here I can step in to set price.
It calls the set price method.
This points to the current object that's calling this method and we're setting the price of the current
object equal to fifty nine ninety nine.
A child, the class can inherit the methods from its parent class that includes getters and setters.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.