0 votes
in JAVA by

Which of the following is the correct syntax for calling a method in Java?

a) myMethod();

b) myMethod(int x);

c) myMethod(5);

d) myMethod(x);

1 Answer

0 votes
by

Answer: c) myMethod(5);

Explanation: The syntax for calling a method in Java is to use the name of the method followed by any required parameters in parentheses.

Related questions

0 votes
asked Apr 13, 2023 in JAVA by Robin
0 votes
asked Aug 21, 2022 in JAVA by sharadyadav1986
...