Sample Code
public void setupt rame(string example)
button button new Button("Example");
button, addActiontistener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println(example);
Question: Which do you add to the declaration of the parameter named example for the sample code
above to compile and run?
Answers
Answered by
0
(So sorry, I could not decide for answer above, the way u had written or typed those above is very confusing to me... But I hope the explanation down below helps you out on this one.)
Explanation:
Generally, a method by writing its name, followed in parentheses by its arguments (one for each parameter in the method's header) As in the header (where parameters are separated by commas), arguments are are separated by commas as well.
Similar questions