WildChild
12-10-2006, 12:26 PM
This is my line of code:
public void list()
{
for(Account account : accounts) {
account.print();
System.out.println(); // empty line between items
}
}
When i compile the line "account.print();" is highlighted and i recieve an error: "cannont find symbol - method print()".
if i remove this segment of code the class compiles fine, argh! (i think the code is right).
public void list()
{
for(Account account : accounts) {
account.print();
System.out.println(); // empty line between items
}
}
When i compile the line "account.print();" is highlighted and i recieve an error: "cannont find symbol - method print()".
if i remove this segment of code the class compiles fine, argh! (i think the code is right).