Alright, so im trying to change "hello" to "Aello", there fore im changing the first letter of the string to an "A". This string is within an array:
This is what i have:
but im getting an error
I think you mean:
split = "a" + split.substring(1);
Strings are immutable which means they cant be changed. The only
thing you can do is create new Strings.
hello <- you cant make the 'h' an 'a'
a + ello <- but you can create a new string from 'a' and the rest of 'hello'
Edited by: TuringPest on Nov 25, 2007 10:01 PM
jedis? not sure lol, you convince me now. You arent, but you're good
quick question: split = "a" + split.substring(5); that overirdes the rest of the string contents before 5th letter,why and how can i fix that