Java 中string 类型如何转换成short 类型

String temp = “12”;

short sh = Short.parseShort(temp);

最好再try,catch一下。

猜你喜欢

转载自blog.csdn.net/qq_23095607/article/details/85037232