This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing the main method

 
Naufal Mohamed
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it possible to access a class's main method from another class and can a main method return a value?
if possible could anybody tell me how this is implemented.
thank you
 
Prakash Dwivedi
Ranch Hand
Posts: 452
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why not just give it a try, remember main is static method so u can just call it using class name. and dont forget to pass String[] as argument. And it will return void.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Naufal!
is it possible to access a class's main method from another class
Yes.
can a main method return a value?
No.
could anybody tell me how this is implemented.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic