The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 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:

Clueless with constructors?

Posted by Bugger on November 13, 2000 at 10:12 PM

Hi there,

I'm writing a Java program that requires two constructors. I have done the first one:

public CourList (String courFileName) throws Exception {
etc.... that takes a file and constructs a CourList object by reading Course objects from the input file into the instance variable courseVec until the input file is exhausted.

The second one I need help with:

public CourList (vector cVec) {
this is supposed to construct a CourList object based on cVec. It is assumed that cVec is a Vector (possibly empty) of Course objects.

I don't understand what I need to put in this constructor... Can anybody out there help me? I am very new to programming but I do hope to get better at it one of these days...
Thanks a lot,
Bugger



Replies:

Sponsored Links



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