|
-
Java Compile Problem
I have the following method that is giving me grief.
public StudentList makeSubList(MarkList markVec)
{
Vector sVec = new Vector();
Mark mark;
Student student;
Enumeration enumMark = markVec.elements();
Enumeration enumStud = studentVec.elements();
// outer loop for markVec we will compare each
// element in this against the inner loop
while( enumMark.hasMoreElements()){
String s = mark.getStudentId();
// inner loop will step through studentVec
while(enumStud.hasMoreElements()) {
String s1 = student.getStudentId();
if(s.equals (s1)) sVec.addElement(student);
student =(Student)enumStud.nextElement();
}
mark = (Mark)enumMark.nextElement();
}
return new StudentList(sVec);
}
When I try to compile this method the following error is generated
C:\AU ASSIGNMENT 2\StudentList.java:73: cannot resolve symbol
symbol : method elements ()
location: class MarkList
Enumeration enumMark = markVec.elements();
^
1 error
Can some one tell what my problem is?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks