title: Getting an error message - "java.base/java.lang.StringConcatHelper.simpleConcat(StringConcatHelper.java:421)"
body: <p>Hello Guys I was making a program of &quot;Generate all parenthesis&quot; and I got the error message as:-<em><strong>&quot;java.base/java.lang.StringConcatHelper.simpleConcat(StringConcatHelper.java:421)&quot;</strong></em></p>
  <p>along with this I am getting error of stack overflow</p>
  <p>I am attaching a code with this error please see to it and tell me the modification if needed:-</p>
  <pre><code>public class j{
  public static void main(String[] args){
      int n = 2;
      int open = n;
      int close = n;
      String op = &quot; &quot;;
      findAns(op, open, close);
  }
  private static void findAns(String op, int open, int close){
      if (open == 0 &amp;&amp; close == 0){
          System.out.println(op);
      }
      
      if (open == close){
          String op1 = op + &quot;(&quot;;
          findAns(op1, open - 1, close);
          return;
      }
      if (open != 0){
          String op1 = op + &quot;(&quot;;
          open = open - 1;
          findAns(op1, open, close);
      }
      String op1 = op + &quot;)&quot;;
      close = close - 1;
      findAns(op1, open, close);
      return;
  }   }
  </code></pre>