0 votes
in JAVA by
What happens when the main() isn't declared as static?

1 Answer

0 votes
by

When the main method is not declared as static, then the program may be compiled correctly but ends up with a severe ambiguity and throws a run time error that reads "NoSuchMethodError."

Related questions

0 votes
asked Oct 11, 2020 in JAVA by SakshiSharma
+1 vote
asked Jul 27, 2021 in JAVA by SakshiSharma
...