title: How do I create a padString function in Java?
body: <p>Every other question I have seen in my book I had at least some understanding of what the book was asking but this one I have no idea on how to approach it. It goes:</p>
  
  <p>"Write a method called <strong>padString</strong> that accepts two parameters: a String and an integer representing a length. For example,</p>
  
  <pre><code>padString ("hello", 8)
  </code></pre>
  
  <p>should return <code>"hello   "</code> (that's three spaces in there at the end). If the string's length is already at least as long as the length parameter, your method should return the original string. For example,</p>
  
  <pre><code>padString ("congratulations", 10)
  </code></pre>
  
  <p>should return <code>"congratualtions"</code>.</p>
  
  <p>I have no idea on how to approach this being pretty new to Java. This is supposed to be a beginner's homework so I suppose the method is very simple. Please show me how to do this and explain the steps if you can. Please and Thank you to whoever helps.</p>