The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
August 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Multiple Constructor

Posted by Panchapa Kesan on August 08, 2000 at 1:51 AM

In a Multiple constructor class, a constructor can call another constructor. How to call it?
Assume there are three constructors in the class you consider.
Please write a class that contains:

a) three constructor (and some other codes)
b) the third constructor calls the second constructor and the second one calls the first

write a sub-class (extends the first class) that contains one constructor invoking
one of constructor in the super-class.



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us