Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How JAVA converts int into array
How JAVA converts int into array
Implementation idea: define an integer array with the same length at a time through the length of the int array, and then circularly obtain the values of the int array and assign them to the integer array.

For example:

public static Integer[]to Integer array(int[]arr){

int n = arr.length

Integer[]iarr = new integer [n];

for(int I = 0; I & ltn;; i++){

Iarr[I]= new integer (arr [i]);

}

Return to iarr

}