public static int threeSumClosest(int[] numbers ,int target) {
        // write your code here
        int[]A=numbers;
        int t=target;
        Arrays.sort(A);
        int rel=0, mind=Integer.MAX_VALUE;
        for (int i=0, n=A.length; i<n;++i) {
            for (int j=i+1, k=n-1; j<k;) {
                int sum=A[i]+A[j]+A[k];
                int md=Math.abs(sum-t);
                if (md<mind){
                    rel=sum;
                    mind=md;
                }
                if (sum==t) {
                    return rel;
                } else if (sum<t) {
                  ++j;  
                } else 
                    --k;
            }
        }
        return rel;
    }