@@ -0,0 +1,516 @@
+package array;%0A%0Aimport java.util.Arrays;%0A%0A/**%0A * Created by Yue on 2017/10/26.%0A * leetcode no.628%0A */%0Apublic class MaximumProductOfThreeNumbers %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        int%5B%5D nums = new int%5B%5D %7B-4, -3, -2, -1, 60%7D;%0A        System.out.println(maximumProduct(nums));%0A    %7D%0A    public static int maximumProduct(int%5B%5D nums) %7B%0A        Arrays.sort(nums);%0A        int n = nums.length;%0A        return Math.max(nums%5Bn - 3%5D * nums%5Bn - 2%5D * nums%5Bn - 1%5D, nums%5B0%5D * nums%5B1%5D * nums%5Bn - 1%5D);%0A    %7D%0A%0A%7D%0A

add leetcode no.628