Norm Radder

+ Follow
since Aug 10, 2005
Worked mostly with IBM mainframe assembly code. Loved IBM's VM OS.
Eastern Florida
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Norm Radder

A problem might be with what the calling code does with the returned value.
In the first code, the value in head will be what was passed. Except for  a null value.
In the second code, head will point to the added node.
14 hours ago

In this method, head is a local variable.  Changing its value won't change the variable/value that was passed to the method.
15 hours ago

What do you mean?

Nothing.  That post should be ignored.
16 hours ago

why cant i just use head to find tail of link list here

It is a local variable so your idea should work.
Did you try it?  What happened?

Note: The ending code tag wasn't positioned after all the code that was to be wrapped.  Select all the code to be wrapped before clicking on the Code button.
Also use Preview before hitting the Submit button to be sure the code is properly wrapped.
16 hours ago

  how to set all the values of setter

Create an instance of the class, Generate a random value for each setter method and call the method with the value.
18 hours ago
I don't know any of the classes you are using.
How are you trying to debug the code?  Add some print statements that print the values of variables as the code is executed so you can see the execution flow and some reasons why it is executing the way it is.
1 day ago
Another thing: Don't ignore exceptions - Always call the printStackTrace method inside of a catch block
1 day ago
There are two methods: indexOf finds the location of a substring in another String.
The substring  method extracts a String from another String.
So if you know the locations of the delimiting Strings "*-*" you can use those locations to get the substrings of what is before the first delimiter and what is after the second delimiter. Concatenating those two Strings will get a new String that does not contain the delimiters and what was between them.
1 day ago

have a customer delimiter of *-* between strings that i want to remove, for example: *-*RedorDead :*-*

Ok, "*-*" delimits the Strings to be removed.  The String class's indexOf and substring methods could do that.
1 day ago
When designing a class, you need to have a reason for the class to exist and an idea of what data and methods the class needs to have.
What is the purpose of the ContactInformation class?  What data does it need to hold? 
It is up to the class's designer to answer those questions so the class can be designed and written.

It seems you are trying to write the code for a class without having any design for the class.

If I were designing that class, I'd have it hold the first and last name and other info like: email, phone, geolocation, mailing address, etc
1 day ago
What data is the ContactInformation supposed to contain?  How is that data copied into an instance of the class?
1 day ago

i have defined a datatype of firstname as ContactInformation

"Cerosh" as a String  could be a person's first name, not a reference to an instance of a class.

Is the ContactInformation class supposed to contain a person's first and last names as Strings?
1 day ago
Can you show a sample input with the desired output so we  understand what you are trying to do?
1 day ago
What line in the source code is that error on?

Should that value be passed to the constructor as a String: "Cerosh"?  Not as a reference to a ContactInformation object?
The constructor would have to be changed to take String as its arguments.
1 day ago