Thank you so much for pointing out the problems in the
Java program that I posted. That little
test program is now running without any problem.
What I am really trying to do is the Java class shown below. I am still struggling with it. Somehow, the data are eithere not properly added to the List (called the recursiveTextArray) or I still do not iterate the List correctly because when I iterate the List in the static void main(...) method, I see the first line of my data only in the console - [] Animals.
No iteration further.
I am supposed to see:
[] Animals
[OO-3.1} Dog
[TgtObj-3.1] Barks
[OO-3.2] Cat
[TgtObj-3.2] Hacks up furball
Here is the code: