Java Visibility Options

Java has 4 visibility options: Public, Protected, Private, and Default. However, is those visibilities enough? Sometimes we need to weigh tradeoffs between different dimensions such as Design, Abstraction, Testing, and Security. C++ Has interesting fine-grained, class-level control with a friend. Java does not have that, but there are some interesting options we do in order to imporve things a bit. Today I want to share a video going through the options we have in Java. I also will show some C++ code so we can see how C++ would handle it. Java also has modules but that is not widely adopted in the industry as most companies still run on java 8. So Let's get started!

Popular posts from this blog

Java Agents

Manage Work not People

DDD The Lost Discipline