Josephine....
Here is what you need to do, some of which you've done already:
1. Get the string text (you've done - line = Keyboard.readString( );)
2. Get the length of the text (you've done - characterCount = line.length();)
3. Start your count at 0 (you don't have...create some int variable, like "count" and start it at zero)
4. Do while statement that will keep looping while your "count variable" (#3 above) is less than the length of your text "characterCount" (#2 above)
5. Create print statement that prints the text character. You have System.out.println(idx); which is printing the index number, not the letter. You need something like.... System.out.println (line.charAt(count)); (assuming "count" is your counting variable. #3 above)
Now, you need something to move to the next letter. You can do this with count++ (assuming "count" is your counting variable". #3 above).
Hope this helps - if not, let me know. : )
Loreta