• Post Reply Bookmark Topic Watch Topic
  • New Topic

RE:public static int main(string[] args)  RSS feed

 
Ahshan Md
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone please explain me,that as to public static int main(string[] args) could not be used

if,it is a problem with method signature,then it why the error is not displayed at the compilation time
 
Vijitha Kumara
Bartender
Posts: 4001
42
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahshan Md wrote:...if,it is a problem with method signature,then it why the error is not displayed at the compilation time

If you tried and no errors then it's not a problem, isn't it? It's just another method happen to have the name "main". So it's just like any other method.
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahshan Md wrote:can anyone please explain me,that as to public static int main(string[] args) could not be used

if,it is a problem with method signature,then it why the error is not displayed at the compilation time

It's not a problem, but, if you don't follow the signature, then JVM doesn't find the main method, which it wants to invoke/load you class.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!