-4

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

samira
  • 1
  • 1

2 Answers2

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