title: How to do string formatting with placeholders in Java (like in Python)?
body: <p>I am new to Java and am from Python. In Python we do string formatting like this:</p>
  
  <pre><code>&gt;&gt;&gt; x = 4
  &gt;&gt;&gt; y = 5
  &gt;&gt;&gt; print("{0} + {1} = {2}".format(x, y, x + y))
  4 + 5 = 9
  &gt;&gt;&gt; print("{} {}".format(x,y))
  4 5
  </code></pre>
  
  <p>How do I replicate the same thing in Java?</p>