Java Number Negate negate(int[] ar)

Here you can find the source of negate(int[] ar)

Description

negate

License

Open Source License

Declaration

public static int[] negate(int[] ar) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int[] negate(int[] ar) {
        int[] negated = new int[ar.length];
        for (int i = 0; i < ar.length; i++)
            negated[i] = -ar[i];/*from ww w. j a  v a  2 s .co m*/
        return negated;
    }
}

Related

  1. negate(Comparable v)
  2. negate(double[] a)
  3. negate(double[] output, double[] a)
  4. negate(double[] values)
  5. negate(final Boolean bool)
  6. negate(int[] input)
  7. negate(int[] x, int Max)
  8. negate(String expr)
  9. negate(String string, String trueValue, String falseValue)