Generating three-letter strings from five-letter words
Your program can be simplified to something like this:

System.out.println("Please enter a five letter word"); 
Scanner sc = new Scanner(System.in);
String input = sc.nextLine();

for (int i = 0; i &lt; input.length(); i++) {             // pos. of 1st letter
    for (int j = 0; j &lt; input.length(); j++) {         // pos. of 2nd letter
        for (int k = 0; k &lt; input.length(); k++) {     // pos. of 3rd letter
            if (i == j || i == k || j == k) continue;  // any letter taken twice? -&gt; skip
            System.out.printf("%c%c%c\n", input.charAt(i), input.charAt(j), input.charAt(k));
        }
    }
}


Some more pointers:


while this works for combinations of three letters, for combinations of more letters (or arbitrary numbers of letters) you should use some sort of recursive function
you might want to check whether the entered word is actually five letters long
before printing, you could store the three-letter-words in a Set&lt;String&gt; to filter out duplicates
the question is a bit unclear whether it's about three-letter strings or three-letter words; in the latter case you might want to get some dictionary of valid three-letter words and check whether the combinations are in that list