title: Create an array with n copies of the same value/object?
body: <p>I want to create an array of size <code>n</code> with the same value at every index in the array. What's the best way to do this in Java?</p>
  
  <p>For example, if <code>n</code> is 5 and the value is the boolean <code>false</code>, the array should be:</p>
  
  <pre><code>= [false, false, false, false, false]
  </code></pre>