Win a copy of Spring in Action (5th edition) this week in the Spring forum!

Victor Thomas

Greenhorn
+ Follow
since Oct 31, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Victor Thomas

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.
8 years ago
Okay, I think I have something better now, (at least eclipse quit complaining...)


And...

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.

v
8 years ago
damn sheriff beat me to the draw ...
8 years ago
Yup!

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.
8 years ago
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...

Complete code:









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.

v
8 years ago
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.

v
8 years ago
Hey jack,
I'm kinda very new here so take what I say with a grain of salt... Could you be a little more descriptive in what you're trying to accomplish? Do you mean this?


with the intervening values filled in? BTW, you aren't trolling, are ya?


8 years ago
Thanks Stephan,Rob, and Mohamed! I am embarrassed to say, I totally missed it... Apparently I need to take a break and go do some suburi. Again, thanks so much for your assistance. Take care.

V.
8 years ago
Hello All,
I'm getting this error and really don't see where I am erring. A previous version I have runs fine in eclipse and from the commandline, however this doesn't :


The class file is :

Other than removing some comments and debugging System. out() statements, this is the same file that still works in the earlier incarnation. Any help, or quicker eyes, would be welcomed. Thanks.

V.
8 years ago