4 ms·
I was skeptical too. But after reading the JEP i think i am convinced. It makes an analogy to packages. We allow classes to exist in the default package. There
by Gunax 3y ago
I was skeptical too. But after reading the JEP i think i am convinced.
It makes an analogy to packages. We allow classes to exist in the default package. Therefore, I think it's reasonable to allow methods to exist in a default class.
Of course you shouldn't so this in real work, but that's also true of the default package.
I also like that main doesn't need an argument. Many noob programs don't even use the String[] args parameter anyway, so let's not require it.
- pylua 3y agoSeems like a complex explanation when someone new eventually asks why is this done this way.