title: Flatten nested arrays in java
body: <p>I want to flatten nested arrays like:</p>
  
  <pre><code>[[[1],2],[3]],4] -&gt; [1,2,3,4] 
  </code></pre>
  
  <p>manually in java I can't find a clue ! :S </p>
  
  <p>I have tried a manual java script guide but it doesn't get a solution </p>