title: Converting boolean to BitSet in Java
body: <p>So I before had this:</p>
  
  <pre><code>public static final boolean opaqueCubeLookup = new boolean[4096];
  </code></pre>
  
  <p>But I found out that BitSet it much better at managing memory, so I changed it to this:</p>
  
  <pre><code>public static final BitSet opaqueCubeLookup = new BitSet(4096);
  </code></pre>
  
  <p>I also had this code:</p>
  
  <pre><code>opaqueCubeLookup[par1] = this.isOpaqueCube();
  </code></pre>
  
  <p>But after moving to BitSet I have problem, I get this error:</p>
  
  <pre><code>The type of the expression must be an array type but it resolved to BitSet
  </code></pre>
  
  <p>How can I fix it?
  Any help is appreciated!</p>