Thanks to all! I've gotten it to work!
while( ! stack.isEmpty() ){
Country s=(Country) stack.pop();
System.out.println(s.name);
}
Type: Posts; User: babe20042004
Thanks to all! I've gotten it to work!
while( ! stack.isEmpty() ){
Country s=(Country) stack.pop();
System.out.println(s.name);
}
I have a program that reads the names of countries from a file, prints them to the screen then prints thm from the stack. However when it prints from the stack this is the resulting output:
...