[Part 5 - Comparing Java & C#] Non-Access Modifier

Java provides a number of non-access modifiers to achieve many other functionality.

  1. The static modifier for creating class methods and variables
  2. The final modifier for finalizing the implementations of classes, methods, and variables.
  3. The abstract modifier for creating abstract classes and methods.
  4. The synchronized and volatile modifiers, which are used for threads.
(source: http://www.tutorialspoint.com/java/java_nonaccess_modifiers.htm


C#'s equivalent:
1. Static (same)
2. Sealed (not same) . the final keyword using in Java is used to define an entity(including  classes, methods) which cannot later be changed. Using Sealed in C# only apply for classes.
3. abstract(same)
4. (I don't know. I'm gonna update later)
Share on Google Plus

About Chien

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.

0 comments:

Post a Comment