[Bluej-discuss] Book: Excercise 1.17
Matthew Brandt
mattchief at gmail.com
Fri Aug 4 20:56:00 BST 2006
List,
I hope that this isn't a frivolous question that has been answered in the
past or is due to a mistake on my part. I am trying to run the
exercise 1.17listed in the most recent edition of the "Objects First
with Java: A
Practical Introduction Using BlueJ." When I try to compile the Student class
I receive the error: <identifier> expected
What am I missing here?
Cheers,
Matt
Specifically the compiler hangs up on (see arrow):
public class LabClass
{
private String instructor;
private String room;
private String timeAndDay;
-->private List<Student> students;
private int capacity;
/**
* Create a LabClass with a maximum number of enrolments. All other
details
* are set to default values.
*/
public LabClass(int maxNumberOfStudents)
{
instructor = "unknown";
room = "unknown";
timeAndDay = "unknown";
students = new ArrayList<Student>();
capacity = maxNumberOfStudents;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bluej.org/pipermail/bluej-discuss/attachments/20060804/cd2f0a69/attachment.html
More information about the bluej-discuss
mailing list