I'm all for that, but I really doubt there's a definitive "this is why things are the way they are" source of information. We can come up with reasons that forcing main to be public makes sense, and...
Type: Posts; User: KevinWorkman
I'm all for that, but I really doubt there's a definitive "this is why things are the way they are" source of information. We can come up with reasons that forcing main to be public makes sense, and...
That makes sense. Guess the examples I saw of making main private were older, which is why they don't work on my JVM.
I'm not sure how packages impact the scope of main. Sure, it can have...
Like I said, it doesn't really matter why. There probably isn't a "this is why main must be public" section of the JLS. Actually, in some of the reading I'm doing, they claim that main doesn't have...
The simple answer is because that's what the language designers decided. It's probably best to not worry about it too much. I could come up with a few logical reasons, but the simple fact is, that's...