JAVA The constructor Integer(int) is deprecated 客官°小女子只卖身不卖艺 2024-04-18 08:27 9阅读 0赞 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.
还没有评论,来说两句吧...