title: Java-To insert a substring into a main string after a given substring of main String
body: <blockquote>
  <p>There are 3 text fields the user will type into</p>
  <p>&quot;To be inserted message&quot; in first Text field</p>
  <p>&quot;The message&quot; in second Text field</p>
  <p>and a substring of the message in the third text field</p>
  </blockquote>
  <p>The program should be able to insert &quot;To be inserted message&quot; in Message after the substring.</p>
  <p>Example ↓</p>
  <p>Message→ Stack flow</p>
  <p>To be inserted message → over</p>
  <p>substring→Stack</p>
  <p>Output →
  Stack over flow</p>