title: Combining numbers into one Java variable
body: <p>I am trying to make a program that, depending on an int called <code>length</code>, adds a certain number of 9s to a variable called <code>nines</code>. For example, if <code>length</code> is 4 then I want <code>nines</code> to equal 9999. If <code>length</code> is 7, I want <code>nines</code> to equal 9999999. The value of <code>length</code> needs to correspond to the number of nines in <code>nines.</code> Is this possible, and if so, how?</p>