Two string checker for anagrams
Two strings are anagrams if they are written using the same exact letters. For example, ‘Eleven plus two’ and ‘Twelve plus one’ are meaningful anagrams of each other.
- Maven 3 (using mvn 3.5.2 version)
- Java 8 (using 1.8.0_131)
In terminal run command:
mvn clean install
After building, run:
./run.sh <first_sentence> <second_sentence>
# Example:
./run.sh "Eleven plus two" "Twelve plus one"
Or calling jar directly:
java -jar target/anagram-1.0-SNAPSHOT-jar-with-dependencies.jar <first_sentence> <second_sentence>
Examples:
java -jar target/anagram-1.0-SNAPSHOT-jar-with-dependencies.jar aaaa aaaa
Exact anagram: TRUE
Meaningful anagram: TRUE
java -jar target/anagram-1.0-SNAPSHOT-jar-with-dependencies.jar "Eleven plus two" "Twelve plus one"
Exact anagram: FALSE
Meaningful anagram: TRUE