手写代码注意点 -- 类型转换

char, int, long, boolean, float, double --> String

Correct syntax: String.valueOf(char)

Wrong syntax: char.toString()

Because these primitive are not inherit from Object, so they do not have toString() function.

猜你喜欢

转载自www.cnblogs.com/frankcui/p/11115842.html