Why create a new instance of Main?
I see many code samples posted that create a new instance of Main, but none of them seem to use it. But yet the Netbeans IDE won't seem to run without it. What is it for? How can it be utilized? How can it be nullified if it's not needed?
Yes, that's a fair interpretation of my question. Why would Netbeans, or other IDE's, create a new instance of Main? Common logic says that there can only be one Main. More than one creates confusion.
> Yes, that's a fair interpretation of my question. Why
> would Netbeans, or other IDE's, create a new instance
> of Main? Common logic says that there can only be one
> Main. More than one creates confusion.
There can only be one main(String[] args) per class, but there's nothing which says that there can't be one main method in each class. I usually uses main methods to show example code, or to have some code which performs some kind of tests.
Kaj
kajbja at 2007-7-13 12:46:09 >
