analysis of the difference between C # namespaces and Java Packages
This article mainly introduced the C # namespace and Java package differences, more detailed analysis of the C # namespace and Java package of the same point and different points, very practical value, the need for friends can refer to the
This article analyzes the difference between the C # namespace and the Java package. Share to everyone for your reference. The specific analysis is as follows:
1, all is for the reusability (reusebility)--software engineering in a very important goal.
2, C # inside the namespace and Java packages are the control mechanism of access rights.
1. The C # namespace is just a logical structure that allows the physical location of the organization's class files to be stored in an inconsistent logical structure, while the physical structure of the class files in Java must conform to the logical structure.
2, the Java package itself does not have the concept of a child package, all package are tied to the relationship, no one who contains the problem. For example: There is absolutely no relationship between Org.dominoo.action and ORG.DOMINOO.ACTION.ASL between the packet and the child package. They are separate packages, each with their own set of class/interface. In a Java file in ORG.DOMINOO.ACTION.ASL, you must import org.dominoo.action if you want to refer to a class/interface in org.dominoo.action.
c++/c# namespace scheme is not, a namespace can have its own sub-namespace, we may wish to namespace also known as package, then c++/c# between the package can be the relationship between the packet and the child package.
3, the import statement is used in Java and the using namespace statement is used in C #.
I hope this article will help you with the C # program.