Create LongestCommonPrefix.java

just compare every character until we find a different character at some position.