java getSelectedItem()

请问为什么转化为字符串会错误呀,我之前一个程序这样写没事,这个就报错了,请问为什么

img

img

img

字符串转换要写 toString()方法