Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Muaz Bashara   on Oct 07 In Java Category.

  
Question Answered By: Adelmo Fischer   on Oct 07

So what is your problem?
The JVM requires a method with the following syntax
public static  void main(String[] args)
to be present in your class in order to be able to run this class.
Of course you can also have a method which is private. There is nothing
wrong with it.
Why should the compiler complain? Since the method signature does not match
the requirements
of course this class cannot be executed.
I do not understand what your problem is. You get the error that you deserve
when you try to run your
class.

Share: 

 

This Question has 9 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on private static void main Or get search suggestion and latest updates.


Tagged: