title: All possible permutations of words in a sentence
body: <p>I have a sentence, </p>
  
  <pre><code>I love java coding
  </code></pre>
  
  <p>I need to write a function that returns an array list of all possible permutations of words in the sentence, viz</p>
  
  <pre><code>I java love coding
  I coding love java
  .........
  </code></pre>
  
  <p>I have split the sentence into an  ArrayList and now at a loss as to how to go about the task efficiently.
  <code>C++</code> has a function <code>nextPermutaion()</code> which provides a out of the box solution. Does java provide something similar. If not what would be an efficient way to get this done.</p>