This simple program accepts a word as a command line argument and prints its rank number, based on where it falls in an alphabetically sorted list of all words made up of the same set of letters. (e.g. ABC ranked 1, ACB ranked 2, BAC ranked 3, and etc.)
1. Compilation:
javac WordRanker.java
java WordRanker ONEWORD TWOWORD THREEWORD
$ java WordRanker ehllo hello
ehllo = 1
hello = 13
Total execution time in ms: 3
This program is intended as a demo of techniques for programming in Java. Please feel free to contact me at weihotline@gmail.com if you have any questions or concerns.