how to fix this problem: Main method not found in class jamel.Jamel, please define the main method as: public static void main(String[] args) enter image description here
Asked
Active
Viewed 106 times
-4
-
I'm not a programmer and this source code is ready How do I fix this error? – samira Oct 01 '19 at 15:06
-
Please do not rate negative – samira Oct 01 '19 at 15:11
-
Please share the source code of jamel.Jamel class. Your screenshot is showing a different class. – Sujay Mohan Oct 01 '19 at 15:28
-
if this method - public static void main(String[] args) is not present in your class. You should ask the developer who created this class. Because it depends on the requirements. – Sujay Mohan Oct 01 '19 at 15:34
-
@Sujay Mohan thank you. fixed. – samira Oct 02 '19 at 16:54
2 Answers
0
The main method is just a method that java calls that actually does stuff in your program. If you don't create this method then what is your program for? You'll just have a bunch of classes that you don't use.

J. Lengel
- 570
- 3
- 16
0
If Jamel is your main class where your application starts from scratch then you need
public static void main(String[] args) {
}
this is the entrance of your application to start with. from here on-words in your main method you should start calling other object. but from the screenshot I assume that that is not your want. My guess may be wrong. but figure out what is your starting class and does it have a main method and main method calling right object to start your application.

Jigar Gajjar
- 183
- 2
- 12