Basic HTML version of Foils prepared July 10 1996

Foil 23 Overloading Constructors

From Introductory Lectures on Java -- An Overview Mixing Code and Comments Trip to China and Icase Tutorial -- July 12-28 and June 10-13 96. by Geoffrey C. Fox


1 You are allowed to have more than one constructor in a class, if the constructors have different types or numbers of arguments. For example, for people who are using the java.awt.Point class, you can add a constructor to mRectangle which creates a rectangle by giving the top left and bottom right corner points.

in Table To:


Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Dec 14 1997