Java Coder
What do you understand by private, protected and public?
1 Answer(s)      3 years and 5 months ago
Posted in : Java Beginners

Hi,

What do you understand by private, protected and public?

thanks,

Ads

View Answers

April 16, 2013 at 6:26 PM


HI,

In Java programming we use this to display the result: inheritance in private,protected,public etc. To know the concept of inheritance clearly you must have the idea of class and its features like methods, data members, access controls, constructors, keywords this, super etc. The private inheritance is used to define the private class in most restrictive, while public is the least restrictive. However the protected keyword allows visibility to a derived class in a different package.

For more about the Private, Protected and public visit this link :

http://www.roseindia.net/java/language/inheritance.shtml

Thanks,










Ads

Advertisement