Computer Applications
Which of the following is a valid method prototype in Java?
User Defined Methods
12 Likes
Answer
public double calculate(double x, double y)
Reason — The syntax of a method prototype is:
<access-specifier> <return-type> <method-name> (<parameter-list>)
Only public double calculate(double x, double y) follows this syntax.
Answered By
3 Likes