i知 having difficulties assigning one string to the other. I知 required to assess each char in the string then assign t(i) = s(i). Before I evaluate each character in the string I知 trying to assign them using charAt().
Here痴 what I did so far:
String string = new String("Hello!");
String string2 = new String("");
StringBuffer s = new StringBuffer(string);
StringBuffer t = new StringBuffer(string2);
for(int i = 0; i < s.length(); i++)
{
t.charAt(i) = s.charAt(i);
//t.codePointAt(i) = s.codePointAt(i);
}
Although this doesn稚 compile. Any other suggestions?

New Topic/Question
Reply



MultiQuote



|