Integer extends Number so in that sense Number becomes the superclass of int. I want to store an int array into a Number array.. I have the following code.However, it seems it is not allowed in java.
int[] b = {1,2};
Number[] a = b;
Why java does not allow me to store an int array in number array and how do I store this out ?
Integer[] b = {1,2};then you canNumber[] a = b;