Write a small test program that uses a Collection. Add some objects to the Collection, print it to see what is in it, then call the clear() method and print it again to see if it is empty.
Also...
Type: Posts; User: Norm
Write a small test program that uses a Collection. Add some objects to the Collection, print it to see what is in it, then call the clear() method and print it again to see if it is empty.
Also...
The Collection interface has a clear() method. Can that do what you want?
Can you post the code you are having problems with? What are the variable definitions for the collection and object?
If a Collection is cleared, there won't be anything to delete.
Please edit...