aspose file tools*
The moose likes Beginning Java and the fly likes constructors & methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "constructors & methods" Watch "constructors & methods" New topic
Author

constructors & methods

James .D.Johnstone
Greenhorn

Joined: Dec 08, 2004
Posts: 20
I wonder if someone could help me master the concept of using the constructors and methods within a class . ie when a constuctor should be used and when a method should be used within a class


thankyou for your input in advance
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Basically, constructers perform tasks necessary to instantite (create an instance of) an object. In other words, constructors -- which are tecnhically neither methods nor members -- get an object ready to do whatever it's supposed to do.

You may want to read Bruce Eckel's "Initialization and Cleanup" chapter from Thinking in Java...

http://www.faqs.org/docs/think_java/TIJ306.htm


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
James .D.Johnstone
Greenhorn

Joined: Dec 08, 2004
Posts: 20
Thanks Marc that has cleared the cobwebs out of the old stetson !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: constructors & methods