title: Can I find out the length of an array without using .length in Java
body: <p>I have the following:</p>
  
  <pre><code>int count = args.length;
  </code></pre>
  
  <p>Strange as it might seem I want to find out the array length without using the length field. Is there any other way?</p>
  
  <p>Here's what I already (without success) tried:</p>
  
  <pre><code>int count=0; while (args [count] !=null) count ++;
  int count=0; while (!(args[count].equals(""))) count ++;}
  </code></pre>