@@ -0,0 +1,560 @@
+package com.lc.string;%0A%0Apublic class LongestCommonPrefix %7B%0A    public String longestCommonPrefix(String%5B%5D strs) %7B%0A        if (strs.length == 0) return %22%22;%0A        String rst = %22%22;%0A        int index = 0;%0A        for (int i = 0; i %3C strs%5B0%5D.length(); i++) %7B%0A            for (int j = 1; j %3C strs.length; j++) %7B%0A                if (index %3E= strs%5Bj%5D.length() %7C%7C strs%5B0%5D.charAt(i) != strs%5Bj%5D.charAt(i)) %7B%0A                    return rst;%0A                %7D%0A            %7D%0A            index++;%0A            rst += strs%5B0%5D.charAt(i);%0A        %7D%0A        return rst;%0A    %7D%0A%7D%0A

Create LongestCommonPrefix.java