In Java, secure tools are "accessible by successors and others in one package."
In C ++, protected means "inherited."
They are not really equivalent due to the availability of the package in Java.
The only way you can imitate C ++ - security in Java - is to declare classes in their own package, but I do not recommend this.
Mesop source share