In Flex (and many other languages) a function/method of a class can be declared private or protected (or public). What’s the difference? I have the impression it has something to do with the relationship to child classes and how things are inherited or can be called, but I’m not sure what, exactly.
Share
In general:
Thus, visibility increases as you go from private to protected to public.
In C++, you can control how the visibility of members should be inherited to the descendants by prepending the base class name with the
private,protectedorpublickeywords, meaning you want the visibility of the base class members to be at most at that level.In each of the cases above, the descendant classes are of course able to introduce their own private, protected and public members.