Skip to content
Advertisement

Tag: short

Deprecated Short(String) how to update?

I’m handling this problem: Short appears deprecated with a mark. How can I update this for above Java 9 versions? (Now, I have Java 11) Answer You shall use Short.valueOf. This is taken from the javadoc Deprecated. It is rarely appropriate to use this constructor. The static factory valueOf(short) is generally a better choice, as it is likely to yield

Advertisement