posted 14 years ago
Until you find out it's going to be difficult, so you'll need to analyze first. Using getClass(), instanceof and casting you can already find out a lot. A recursive call may be quite useful:
The indentation is there to make it easier for you to see the full structure. The initial call uses an indent of "".