Adding multiple classes in Java
reesericci opened this issue · comments
Reese Armstrong commented
It would be nice if I could add multiple classes in my Java code, something I'm unable to do because Riju only supports one "file" (which I like), but Java requires making each class a new file. Maybe there's a workaround in the JVM to allow for multiple class declarations in one file?
Thanks,
--reese
Radon Rosborough commented
You can do this by defining the additional classes as package-private (i.e., removing the public
modifier): https://stackoverflow.com/a/48839136