Replace characters without using replace function in Java
<p>I want to replace <code>"&lt;(&gt;&lt;&lt;)&gt;"</code> with "&lt;" but its not replacing in my case.</p>

<pre><code>public class Test2 {

public static void main(String[] args)
    {
        String s1 = "&lt;(&gt;&lt;&lt;)&gt;script&gt;";

       if( s1.contains("&lt;(&gt;&lt;&lt;)&gt;"))
       {
        s1.replaceAll("&lt;(&gt;&lt;&lt;)&gt;","&lt;");
         }


    System.out.println("completeText"+s1);

    }

}
</code></pre>
