title: Fastest way to generate all binary strings of size n into a boolean array?
body: <p>For example, if I wanted all binary strings of length 3 I could simply declare them like this:</p>
  
  <pre><code>boolean[] str1 = {0,0,0};
  boolean[] str2 = {0,0,1};
  boolean[] str3 = {0,1,0};
  boolean[] str4 = {0,1,1};
  boolean[] str5 = {1,0,0};
  boolean[] str6 = {1,0,1};
  boolean[] str7 = {1,1,0};
  boolean[] str8 = {1,1,1};
  </code></pre>
  
  <p>What is the most efficient way to generate all possibly binary strings of length N into a <strong>boolean array</strong>?</p>
  
  <p>I don't necessarily need <em>the</em> most efficient method, just one that's fairly efficient and easy for me to multithread.</p>
  
  <p>EDIT: I should note that I will be storing them all in an ArrayList, if that matters.</p>