What's the difference between “package” and “module”?

前端 未结 5 843
你的背包
你的背包 2020-12-04 23:42

I use Java where we only have packages. I know there are other programming languages that also include modules.

What\'s the difference?

5条回答
  •  無奈伤痛
    2020-12-05 00:23

    It's hard to compare semantics in the void. (What other languages do you mean?) A "module" might be analogous to a Java class, or a Java package, or something else entirely, depending on that other language. Typically since "modules" tend to be from procedural languages, I'd lean toward saying Java class, but I think the line is very fuzzy at that point and you could argue package quite convincingly.

提交回复
热议问题