how to make private class member private

Tony tonytdominguez at aol.com
Sun Mar 18 18:04:13 UTC 2018


On Tuesday, 13 March 2018 at 06:03:11 UTC, Mike Parker wrote:

>
> D is not C++, C#, or Java. C++ uses friend to get around the 
> issue. Java has no solution. I don't know about C#.
>

Java has four protection levels. If you don't explicitly specify 
[private, protected, public] the protection level is implicitly 
"package-private". That means that any class in the same package 
can access that attribute. I believe that Java packages are 
identical to D packages.



More information about the Digitalmars-d-learn mailing list