title: How can I remove duplicate elements from a given array in java without using collections
body: <p>I have an array elements like this:</p>
  
  <pre><code>int arr[] = {1,1,2,2,3,3,4,4};
  </code></pre>
  
  <p>I want to remove the duplicate elements from.  Searched on the internet and came to know about ArrayUtil class. Could you please help me by telling it's usage - that's how can I get an array like this in output:</p>
  
  <pre><code>arr[] = {1,2,3,4};
  </code></pre>