Is a Java package the equivalent of a .Net assembly? Is a Java package the equivalent of a .Net assembly? java java

Is a Java package the equivalent of a .Net assembly?


No.

The best comparison would be with a Java ARchive (Jar) file. Java uses packages to control the namespace, and is very similar to C#'s Namespaces.

Here is how I'd compare the environments

Java                    .Net====                    ====Class                   ClassPackage                 NamespaceJar                     Assembly


No, I think a Java package would be more similar to a namespace

And an assembly would be more like a jar (I'm not so sure about this, as I'm much more familiar with Java than .Net... correct me if I'm wrong)


A Java package is like a namespace in .NET.

The equivalent to an assembly in Java is jar file.