It might help you to know Zulfi that a method's "signature" is more than just its name. It also includes the number and types of each of its parameters. You can create more than one method with the same name as long as the parameters are different. This is why the compiler didn't complain that you declared the main with a String (not a String[]).
On Tue, 29 Jun 2021 at 12:48, Scott Palmer <[email protected]> wrote: > Yeah, the main method shown in your screen shot has the wrong signature.. > taking a String instead of a String [] > > Scott > > On Jun 28, 2021, at 9:26 PM, Andreas Reichel < > [email protected]> wrote: > > Greetings. > > You will need to set the "Main Class" in the Project Properties as shown > below. > The "Main Class" will need to have a method "public static void > main(String[] args)" > > Best regards > Andreas > > <Image-PSVR50.png> > > On Tue, 2021-06-29 at 01:16 +0000, Zulfi Khan wrote: > > Hi, > I am working on Netbeans 12.4. > > I have created the project FibSeries2. When I am trying to run it by > selecting the project name from the left pane and right clicking the mouse > and then selecting “Run”, I am getting a small window which says “no main > classes Found”. > > But when I click Build, it works but run is not working. When I click on > run, a small window comes, which tell, no main found. > > > Please guide me. > > I have attached the image. > > > Zulfi. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > > > >
