0
My code is not working . Plz help me with this
5 Answers
+ 5
Arihant Kumar Pls learn the Java lesson carefully.
Every program starts executing from the main method. U haven't written it in ur program.
+ 5
Arihant Kumar Read this carefully:
https://www.sololearn.com/learn/Java/2137/
It is clearly defined and highlighted in this lesson that "Every Java program starts from the main method".
So u need to include it in all ur programms.
Hope that helps....
+ 2
You don't have a main method declared. your main method should look like this:
public static void main(String[] args) {
//your code
}
0
Plz explain
0
Arihant Kumar in java your program starts and ends at your main method, so if you don't have a proper main method declared, it won't know what to do. Hence you are getting an error