Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

"Avoid reassigning parameters such as 'myString'" What kind of error is it?

807589Dec 28 2006 — edited Sep 2 2008
This is the method where the compiler gives me an error that I'm not able to understand...
	private String removeQuotes(String myString) {
		myString.trim();
		if (myString.startsWith("\"")) {
			myString = myString.substring(1);
		}
		if (myString.endsWith("\"")) {
			myString = myString.substring(0, myString.length() - 1);
		}
		return myString;
	}
What's the problem? o_O

Message was edited by:
Lukyan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 30 2008
Added on Dec 28 2006
10 comments
1,390 views