View Single Post
Join Date: Nov 2008
Posts: 249
Reputation: Antenka has a spectacular aura about Antenka has a spectacular aura about Antenka has a spectacular aura about 
Solved Threads: 65
Antenka's Avatar
Antenka Antenka is offline Offline
Posting Whiz in Training

Re: SortedList & List Program

 
0
  #4
Nov 21st, 2008
As I can see, you didn't read this post "We only give homework help to those who show effort". All I can do is give you advices:
1. About String s: String - is a class, when you create an object of class, the class "do not know about it". So you can't cll the object from the class (String.s = null). Also as in your program.
2. The phrase "data=null" in the begginig of the method is wrong (consider, you use it later...).
3.Befor using variables? you have to declare. That way compiler understands, what you will store in it. In your case the type is "E". this mean, that it unknown now, but will be known later. Also you have to know is the base type for all refference types is Object.
4. If you are writing "public void remove(E data)" it means, that function doesn't return value. The return keyword is not out of place.

Also you can answer a questions and I'll try to answer. Good luck.
So what if you can see the darkest side of me?
No one would ever change this animal I have become
Help me believe it's not the real me
Somebody help me tame this animal
Reply With Quote