Comment

Comment by wice

You can have multiple public classes in a file in Java. You just have to wrap them in an outer class, that acts like a module, and declare them “public static”. You can then “import static” the module class in other files, and you can use all these classes simply by name (without having to write OuterC.InnerClass everywhere).
parent wice 5 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton