I have an array with following elements = ["A","B","C"]
Now I want the output to be in the following manner- A B BA AB AC CA BA ... ABC BCA CAB
That is I want to find all the combinations of the elements of all lengths. Could anyone suggest me a java program to do the same thing. Thanks in advance.