[英]I want to pass an object type Stack and a String to another Method in the same Class, but it gives me an error.
[英]As far as I know showinputdialog returns an output of type string but it gives me an error that it cannot convert the object to a String
String val = JOptionPane.showInputDialog(null,
"Search item to Edit ",
"Warning",
JOptionPane.QUESTION_MESSAGE,
null,
new String[]{"Item name", "Item no.","Price"},
"");
错误:
不兼容的类型:Object 无法转换为字符串
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.