title: how to dynamically change the spaces using printf [using java]?
body: <p>I am working on an application that requires me to change the number of spaces dynamically.
  Every time i need to increase the spaces by one. I know the logic behind it, but I couldn't find any documentation to help with the syntax.</p>
  
  <pre><code>System.out.printf("%3s", " ");
  </code></pre>
  
  <p>the code above is inside a nested loop, I would like the number 3 to be dynamic. the number needs to be a variable in order to accomplish what I need it to do.
  how can I set the number before s to a  variable?</p>