|
|
|
|
|
by jdmichal
3718 days ago
|
|
You are being disingenuous. "File" is layman-speak for "compilation unit", so it is not a "completely different subject". You cannot declare multiple top-level types in a single compilation unit in Java. Yes, you can create static types within another type. However, those are not top-level types; they are scoped within the type they are declared in. Let's just put it this way. Would a Java programmer, by way of normal operation, implement a project with a few Java files, each of which contains a type with several static types internal to it, and where those internal static types are in fact the main types of the program? If they wouldn't, then there is no equivalency, because this is something you see in C# code bases all the time. |
|