title: Byte Array to Decimal Java
body: <p>I have a Individual class that has the follow code</p>
  
  <pre><code>public class Individual {
  
      static int DNA_lenght = 64;
      private int fitness = 0;
  
      private byte[] genes = new byte[DNA_lenght];
  
      public void initialise_individual(){
  
          for(int i = 0; i &lt; DNA_lenght; i++){
  
              byte gene = (byte) Math.round(Math.random());
              genes[i] = gene;
          }
  
      }
  }
  </code></pre>
  
  <p>how can I write a method to translate the whole value of the individual into a decimal value?</p>