title: Generating all permutations of a given string
body: <p>What is an elegant way to find all the permutations of a string. E.g. permutation for <code>ba</code>, would be <code>ba</code> and <code>ab</code>, but what about longer string such as <code>abcdefgh</code>? Is there any Java implementation example?</p>