[英]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.