Update LongestCommonPrefix.java

Submission Result: Compile Error

Line 16: incompatible types