Add java solution for LongestWord