+ 3

Can anyone explain diference between private and public and method set?

21st Dec 2016, 9:11 PM
Florian Hyseni
Florian Hyseni - avatar
2 Antworten
+ 4
Great question, Florian Hyseni. The private hides from other classes within the package. The public exposes to classes outside the package. Then there is this "protected" that is a version of public restricted only to subclasses.
21st Dec 2016, 10:51 PM
Tristan McCullen
Tristan McCullen - avatar
- 1
the usage of private can be understood in tea m work project's you better use public in practice
22nd Dec 2016, 5:16 PM
sina
sina - avatar