Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to directly change int array into integer array in java
How to directly change int array into integer array in java
int[]aa = new int[5];

Integer[] bb = new integer [aa.length];

for(int I = 0; I & ltaa. Length; i++){

Bb[i]= new integer (aa [I]);

}

As far as we know, there is no direct conversion. You can look at the API, but the JDK of 1.7 doesn't know whether to adopt this method. In fact, no matter which version of JDK, you call its method and turn it into an integer array. The essence of his backstage implementation must be traversed. You might as well write your own method package.