Given a word, if the positions (order) of the letters of that word are changed, this would produce other words. For example "act" letters order can be changed to produce the word "cat", similarly,scrambling "smart" letters can produce the word "marts."
Write a Java program that accepts two words as input and determines if one of them is resulting from changing the order of the others' letters.