Computer Science Canada

Need Help with strings

Author:  deltag [ Thu Nov 25, 2004 4:41 pm ]
Post subject:  Need Help with strings

i have a test pretty soon and i can't figure out how to replace a part of a string from the original string to something else using charAt() and length() not any built in commands.

thanx

Author:  DanShadow [ Fri Nov 26, 2004 11:39 pm ]
Post subject: 

Personally, Id use two strings, and the substring command.
code:

String initial="helpme",after="";
after=initial.substring(0,4)+" yourself"
System.out.println("Initial: "+initial);
System.out.println("After : "+after);


I think that should work properly...sorry if it doesnt.


: