In my college, I was taught Java using BlueJ and we were asked to write main()
in the following manner (no string array present as parameter):
public static void main()
{
//code
}
This works in BlueJ but it doesn't work in other IDEs like Eclipse (using right now).
All over the internet and books (except college texts), I find main()
declared as
public static void main(String[] args)
.
My doubts:
main()
valid?BlueJ does not require THE main method we all know aka public static void main(String[] args) { }
so BlueJ is seeing that as a regular static method that happens to be called main
"coincidentally."