title: How to find integer array size in java
body: <p>below is my code which is throwing error:</p>
  
  <pre><code>Cannot invoke size() on the array type int[]
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>public class Example{
  int[] array={1,99,10000,84849,111,212,314,21,442,455,244,554,22,22,211};    
  public void Printrange(){
  
  for (int i=0;i&lt;array.size();i++){
      if(array[i]&gt;100 &amp;&amp; array[i]&lt;500)
  {
  System.out.println("numbers with in range ":+array[i]); 
  }
  
  
  }
  </code></pre>
  
  <p>Even i tried with  <code>array.length()</code> it also throwing the same error. When i used the same with <code>string_name.length()</code> is working fine.</p>
  
  <p>Why it is not working for an integer array?</p>