This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I have a program that I am exercising polymorphism with but I cannot access the child members. Any ideas on how I go about getting to these members in my Main()? here is what I have beware quite lengthy)
edited by Dave to format code
[This message has been edited by Dave Vick (edited October 22, 2001).]
I've taken a couple of pieces from your code that I don't understand and placed them here:
You say you can't access the three lines at the bottom. Do you mean you can't access the REF member variable of myRunner? Where is REF declared as a member variable? I see a REF1 member, but you say you added that when something else didn't work. Also, what do you mean by "child members?" Again, I don't see any members that are derived from RaceEntryForm. Try moving the declaration of REF to the top of the class where you declare your other member variables. Also, please let us know why some things aren't working. How do you know you can't access certain variables? Are you receiving an error or exception? Jason
[This message has been edited by Jason Ford (edited October 23, 2001).]