posted 12 years ago
How do you return an entire array from a "get" method? For instance, I'm trying to return an array of Instructor objects. I keep getting this error:
Course.java:77: illegal start of expression
this.Instructor[] = Instructor;
This is my code:
Also, how do you use a set method for an array? I'm getting an error in my Student class that says:
./Course.java:77: cannot find symbol
symbol : variable Instructor
location: class Course
this.Instructor[] = Instructor;
^
./Course.java:77: cannot find symbol
symbol : variable Instructor
location: class Course
this.Instructor[] = Instructor;
^
Thanks!