0

I want from user to input a word and then it returns a random word using the input characters, does it need a for-loop?
I kinda stuck here...

public static void main(String[] args) {


    Random rand = new Random();
    Scanner input = new Scanner(System.in);

    System.out.println("Enter a word: ");

    String temp = input.nextLine();
    char[] myWord = temp.toCharArray();

    for(int i=0;i<myWord.length;i++) {

    }

}
3
  • 1
    Please show us sample input and output. @Hovercraft yes I suspect this as well. Commented May 26, 2018 at 11:04
  • Similar questions Commented May 26, 2018 at 11:05
  • 1
    You can Generate random words using permutation. But those all won't be grammatically correct. Commented May 26, 2018 at 11:12

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.