title: Java: is "$1" a placeholder?
body: <p>I was given a Java exercise:<br />
  Break up camelCase writing into words, for example the input &quot;camelCaseTest&quot; should give the output &quot;camel Case Test&quot;.</p>
  <p>I found this solution online, but I don't understand all of it</p>
  <pre><code>public static String camelCaseBetter(String input) {
      input = input.replaceAll(&quot;([A-Z])&quot;, &quot; $1&quot;);
      return input;
  }
  </code></pre>
  <p>What does the <code>$1</code> do? I think it just takes the String that is to be replaced (A-Z) and replaces it with itself (in this case the method also appends a space to break up the words)</p>
  <p>I couldn't find a good explanation for <code>$1</code>, so I hope somebody here can explain it or share a link to the right resource which can explain it.</p>