+ 1
Java method override
It is possible to override the main method in Java?
2 Antworten
+ 1
Have you looked it up online? What would you like to do?
Have you looked here? You could even try it in the code playground.
https://www.sololearn.com/discuss/347605/?ref=app
https://sololearn.com/compiler-playground/W0uW3Wks8UBk/?ref=app
+ 1
There is the word "override" (not "hide") in the error below:
main.java:6: error: a() in main.B cannot override a() in main.A static void a() {} ^ overridden method is static,final 1 error error: compilation failed (exit status 1)
https://sololearn.com/compiler-playground/cdQgbBOT2T7h/?ref=app