This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Artima Forums.
Message:
thanx
Posted by abcd on November 18, 2000 at 8:02 AM
hi again, just to say thanx.... abcd > > hi ... > > here is code that u may want... > > class c { > > static void main(String ag[]){ > int a= 10; > System.out.println(a); > main(ag); > } > } > > class b{ > > static void method(){ > > String d[] = new String[10]; > > c.main(d); > > } > > static void main(String args[]){ > > b.method(); > > } > > } > > so may be this is code that u want..even u can do recursion > > too..with main().we have done this code on note may u find some compilation error..so remove that..hope u got some idea... > > thanX > > ruchi and hema > > > Suppose somebody has written a class which is the public class for that file(it has the main() method). How can i call the main() method of that class? I know it can not be done directly but then why can't it be done ... Will i be violating any of the rules of OOPs? > > > thanx > > > abcd
Replies:
|