Java Integer to Short intToShort(int[] values)

Here you can find the source of intToShort(int[] values)

Description

int To Short

License

Open Source License

Declaration

public static short[] intToShort(int[] values) 

Method Source Code

//package com.java2s;

public class Main {
    public static short[] intToShort(int[] values) {
        if (values == null) {
            return null;
        }/* ww  w  .j  ava 2  s .  c o m*/

        short[] results = new short[values.length];
        for (int i = 0; i < values.length; i++) {
            results[i] = (short) values[i];
        }
        return results;
    }
}

Related

  1. convertIntegerToShort(Integer intValue)
  2. intToShort(int i)
  3. intToShortArray(final int intValue)
  4. intToShortBytes(int a)
  5. intToShorts(int n)