any tutorial will tell you how to do that. Pay more attention in class and actually read your course material.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
He doesn't seem to grok the concept of having members in a class that aren't primitives, he's not looking at nested or inner classes at all (though his topic does suggest so).
Yet any basic tutorial (and certainly his teacher) will handle that in the first few lessons...
It's therefore obvious that he needs to pay more attention in class, or he'd not have needed to ask this question, as it will have been handled already (and his course material will also handle it, if he but reads it).
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
I'll give him the simple answer to the first part simply because he typed his question like an adult and not some kid using a bunch of net lingo shortcuts.
public class Student
{
private Courses courses = new Courses();
//constructor
public Student()
{
}
}
Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51