[text] Inserting one string into another string java 1am trying to stick one string into the middle of another string ex 13 String One MonkeyPony String Tuo Monkey how would I put string two into string one so it would read something like MonkeMonkeyyPony EDIT I should have been more clear basically what Im trying to do is insert Monkey into the middie of MonkeyPony numerous times so on the first time it would read MonkeMonkeyyPony on the second time it would read MonkeMonMonkeykeyyPony etc. string insert share improve this question edited Mar 1513 at 2255 asked Mar 15 13 at 2216 user2150807 103 02 3 011 4 Answers acive oldest votes You dont need to loop it because the loop is already handled in main. So you just need to use Strings substring function to reconstruct a String made of the first half of one then the second then 21 the other half of the first How do I know the loop is already in main Because assigned you this homework. answered Jul 914 at 415 gt CBoraham 51597 913 share improve this answer 12 U that stings… Didnt think your teacher was that smart now did you… WIErD0 Dec 1714 at 1558 put smoked glasses dctremblay Mar 5 at 011
in Backend, Java, Programming, StackOverflow