aspose file tools*
The moose likes Beginning Java and the fly likes Constructor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Constructor" Watch "Constructor" New topic
Author

Constructor

Vidya Kakumani
Greenhorn

Joined: Jul 10, 2008
Posts: 2
Whats the use of a 'Constructor' in a class?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"Vidya",
Please check your private messages for a message from Campbell.
-DOM
[ August 26, 2008: Message edited by: David O'Meara ]
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Constructors provide a single step for creating an instance of a Class, and can be used to enforce minimum parameters or validate the initial state of the instance.
 
Consider Paul's rocket mass heater.
 
subject: Constructor