The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2000

Advertisement

Advertisement

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:

code to your answer

Posted by ruchi and hema on November 15, 2000 at 8:45 AM

hi ...

here is code that u may want...

class b{
static void method(){
String d[] = new String[10];
b.main(d);
}
static void main(String args[]){
b.method();
}

}

so may be this is code that u want..even u can do recursion
too

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:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us