Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

classes without a constructor

807600Jul 12 2007 — edited Jul 13 2007
Some classes don't have constructors. I understand that all classes will inherit a default constructor, but some classes don't appear to be objects at all. Classes that have main methods in particular seem to be intended not to define objects but instead simply to instantiate other objects and to execute code...... I'm going through a tutorial that has a plethora of example classes that fit this description, but when I create new classes in Netbeans they always provide me with a costructor shell and never provide me with a main method - why is this? is there a name for the type of class I'm describing? And how do you add this type of class to an existing project in Netbeans? I know that I can add main methods and delete constructors from the classes that I create in Netbeans, that's not the point of my question.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 10 2007
Added on Jul 12 2007
46 comments
2,490 views