
Java Error - can't find main method in class
Java Error - can't find main method in class
In this video, I’ll show you how to resolve a java error “can’t find main method(String[]) in class” when you try to compile, this video will help you get up and running quickly.
If you encounter this error then you just forgot to include the .java suffix or extension when compiling your program
#javaforbeginners
#java
#tookootek
Content
3 -> Hey Everyone!
4.533 -> You encountered Java error "can't find main method in class"
9.133 -> because
10.3 -> you run your java program with .java extension
14.033 -> remember .java extension is only needed when you compile
18.533 -> like this
20.933 -> and to resolve the error
22.966 -> You just need to run the program without the .java extension
27.9 -> there you go. It run without error.
30.233 -> Alright! Thank you for watching!
Source: https://www.youtube.com/watch?v=HcDup-7v2WM