Implement a code that counts the occurrences of each word in an input file and write the word along with corresponding count in an output file sorted by the words alphabetically.
Sample Input
Gaurav is a Good Boy
Sita is a Good Girl
Tommy is a Good Dog
Ram is a Good person
Sample Output
D:\>Java FileWordCount inputFile.txt outputFile.txt
Boy : 1
Dog : 1
Gaurav : 1
Girl : 1
Good : 4
Ram : 1
Sita : 1
Tommy : 1
a : 4
is : 4
person : 1