While working, I got this warning(The constructor Integer(int) is deprecated) and i couldn't find alternative constructor/solution online. How can i resolve this issue ?
Integer integer = Integer.valueOf(i);
其他如Float Double 同理
Deprecated. It is rarely appropriate to use this constructor. The static factory valueOf(int) is generally a better choice, as it is likely to yield significantly better space and time performance. Constructs a newly allocated Integer object that represents the specified int value.