Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Need Help with strings
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
deltag




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
DanShadow




PostPosted: Fri Nov 26, 2004 11:39 pm   Post subject: (No 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.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: