Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前我有下面的代码。
String[] ans = {"Yes","No"}; option = questionAsk("Are you sure?",ans);
我尝试简单地将“ans”的定义粘贴到函数的调用中,并尝试对其进行更改,但我似乎无法找到如何使这两行合二为一。
调用方法时可以定义数组:
option = questionAsk("Are you sure?", new String[]{"Yes","No"});