There's no relationship between main and constructors, I suspect you are being confused by JBuilder's auto-generated code ;)
Cheers
Gary
On 7/21/05, Chavoux Luyt <[EMAIL PROTECTED]> wrote:
Hi again
On 7/21/05, Gary Jacobson <[EMAIL PROTECTED]> wrote:
> You don't need to remove the main method from any of the classes in your
> package. When you run a Java app you have to specify which class to run, so
> it doesn't matter if other classes contain a main method.
Surely if I want to use some of the methods from a specific class,
I'll need to remove its "main" method? Won't the "main" method run
automatically whenever I create an instance of the class in another
package (in the (new) main program)?
Maybe you could just point me to a specific tutorial/link that
explains the use of "main". When does it get called? And (for me) a
strange setup: Why is it inside the class definition (sometimes
creating instances of the class within the class definition itself)?
What (if any) is the relationship between the constructor and the
"main" method of a class?
> The only change you might have to make is specifying "public" for methods
> that you want to be called from outside your package (and removing "public"
> from methods that you don't want to be accessible).
Thanks, allready done that :-) Most of the methods are static public
(wrappers around native assembler functions of TINI). Maybe I could
just make the "main" method private/protected?
Regards
Chavoux
