File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Constructor