Reputation: 692
Currently I have the code that is below.
String[] ans = {"Yes","No"};
option = questionAsk("Are you sure?",ans);
I have tried simply sticking the definition of 'ans' into the call of the function and have tried to change it around but I cannot seem to find how to make these two lines become one.
Upvotes: 0
Views: 85
Reputation: 37823
You can define an array when calling a method:
option = questionAsk("Are you sure?", new String[]{"Yes","No"});
Upvotes: 13