Here you can find the source of toInt(short[] arr)
Parameter | Description |
---|---|
arr | a short array |
public static int[] toInt(short[] arr)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from w w w . j a va 2 s . c o m*/ * Converts an array of short values to an array of integer values. Returns a * new array. * * @param arr a short array * @return an integer array */ public static int[] toInt(short[] arr) { int n = arr.length; int[] converted = new int[n]; for (int i = 0; i < n; i++) { converted[i] = arr[i]; } return converted; } }