Paul Clapham wrote:Well, you have about 90 lines of code in each of them...
Sorry for the amount of code contained herein. Like I expressed earlier, I had to add code to an existing project. I would never write this of my own free will...
Paul Clapham wrote:And you never really did say what you didn't like about the first attempt
What I was concerned with was the what I thought was the problem which happened to by the real problem as you surmised: scope
Paul Clapham wrote: (and by the way, that stat/non-static issue has nothing to do with generics, and vice versa).
I was just watching the tube and realized that the issue was that LinkedListNode is an inner class and that's why it worked when I :
So my original mistake was try to instantiate the inner class. Once I finished kicking myself in the butt, I decided that I shouldn't wait until almost the last minute to complete an assignment again.
Paul Clapham wrote:So I'm sorry, I'm not going to do that.
No worries! I sometimes wear myself down and don't see the problem until I let go. I always hope that a better pair of eyes can spot my insanity quicker than me. I just need to manage my time better...Thanks for your help.
Okay, I think I have something better now, (at least eclipse quit complaining...)
Don't know what I did right, but at least now I can safely submit the code. I really do wish someone could explain to me the why this is 'better' than my original. I will still wait to mark this as resolved.
I don't rightly know the mechanism behind it, but if you use *nix you all would see that them there options <ie -h , -al, --version, etc> on various utilities aint counted as arguments to the executable.
finally googled around some more... I probably shouldn't do it this way, however I'm almost out of time and need to submit this as is. However, it does works...
If someone has a better solution, please post it! Again, if anyone could suggest a good tutorial on generics, I'd really appreciate it. If no one replies by tomorrow, I'll mark this as resolved. BTW, this is not the way I'd do an implementation of a Linked List ... Thanks in advance.
Okay, I'm just really confused right now... the original signature for the method I'm supposed to write :
So silly me trying to show off figured...
Of course this went over like a lead zeppelin, so...
I "think" I have the correct algorithm to reverse the list, I just need to get past this. After googling around I figured that making the method generic would solve most of the problem... LinkedListNode<T> is an inner class of the abstract class LinkedListClass. I could really use some assistance and a good canonical source with examples on generics since this text sucks on the subject. Thanks.