Hi
I have a LinkedList of class called Room. Now i want display elements that i stored in that class . i also implemented toString() in my Room class which returns string.
The code i tried is below but its not working . i dont know the reason . can anyone help me .
private static void callDisplay(LinkedList<Room> roomlist) {
// TODO Auto-generated method stub
ListIterator<Room> iter = roomlist.listIterator();
while ( iter.hasNext() )
{
System.out.println("Came in");
Room r = iter.next();
r.toString();
}
}