Here is my code so far and i`m editing it and adding some code, is there some one might tell me that this is the right way of coding list in permutation.

This program is not yet complete.

package man;

import java.util.LinkedList;

public class ScrambleWord {
	public static void main(String []args)throws IOException{
		LinkedList scrambleList = new LinkedList();
        String str;
        for(int counter=1; counter<=3; counter++){
			scrambleList.add(new String(str));
			str = str+2;
        System.out.println("Enter a Word:");
        BufferedReader br=new BufferedReader(new InputStreamReader(;
        System.out.println("Permutations are :");
        permute("", str);
        System.out.println("The First Item in the List is");

  public static void permute(String beginningString, String endingString) {
    if (endingString.length() <= 1)
      System.out.println(beginningString + endingString);
      for (int i = 0; i < endingString.length(); i++) {
        try {
          String newString = endingString.substring(0, i) + endingString.substring(i + 1);

          permute(beginningString + endingString.charAt(i), newString);
        } catch (StringIndexOutOfBoundsException exception) {

way of coding list in permutation.

Can you explain what you want the code to do?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.