Sign in to follow this  

Quick help w/ String problem

This topic is 3848 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all, I am having a small problem with one of my String variables. It seems that even though it finishes the method, when the method is called a second time the String variable still has the data. I was wondering if perhaps I had declared it wrong, or if any one can tell me an easy way I can use the clear function so that the data is erased after I am done with it. Here is the coding. [edit: removed code at request of class instructor -SiCrane] [Edited by - SiCrane on February 13, 2009 4:15:19 PM]

Share this post


Link to post
Share on other sites
Please at least point out where the problem occurs.

String is a class, and there are plenty of String instances flying around.

Which method gets called twice?

Which result isn't cleared?

Which String still has data? String are, by the way, immutable - you can't clear them.

Share this post


Link to post
Share on other sites

This topic is 3848 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this