Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

is it possible 2 call a main method  RSS feed

 
gan esan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it possible 2 call a main method from any other class
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.
 
H Sivad
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pradeep Bhat:
Yes.


Specifically since it's a static method you do this:



This will branch to the other class's main in the current thread.


You could wrap this in a class and kick it off on it's own thread:



H.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!