O'Reilly logo

C# for Java Developers by Adam Freeman, Allen Jones

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modifiers

C# and Java both use modifiers to specify the accessibility and behavior of program elements. Much commonality exists between Java and C# modifiers, but many differences and inconsistencies exist as well. The differences in usage and effect are often subtle and difficult to understand and remember when coming to C# from a Java background. In this section, we contrast the Java and C# modifiers. We group these modifiers into three categories: access, inheritance, and other.

Access Modifiers

C# includes all of the access modifiers available in Java and provides additional flexibility with the introduction of two new modifiers. However, accessibility based on package membership in Java doesn’t translate to the equivalent accessibility based ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required