Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
Help setting up a Class
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="kevinc, post: 546752"] What you have is the correct way to do it. If you want a ctor that takes N number of students. You would probably want to create a Course ctor that takes a collection public class Course { public Course(List aCollectionOfStudents){ studentColl.addAll(aCollOfStudents); } private List studentColl = new ArrayList(); } [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
Help setting up a Class
Top