Often times I see the infamous void main() around the forums and almost immediately a comment following the question telling the user to never use void main() (which I am in complete agreement with). But where is the origin of void main()?
Why am I still seeing newer people pick up the bad habit of having main return nothing when the proper way is to return an int.
I understand WHY this method is wrong as explained in this question and multitudes of others, but I don't how this method of declaring main came about or even why it is still taught to some students.
Possible reasons:
public static void main(...).maindoes't return, although it implicitly returns0.main()with no return type, and it would beintby default. Maybe some assume a missing return type is equivalent to avoid.