asked 173k views
1 vote
Assume that you have written a method with the header void myMethod(string a). This method returns ________.

a. nothing
b. myMethod
c. a string value
d. a numeric value

asked
User Denkeni
by
7.8k points

1 Answer

2 votes
The word before your method name (myMethod) always determines the return type for your method. So in this case, you specified "void", which in Java means, nothing.

The answer is A: Nothing
answered
User Chirag Sanghvi
by
7.6k points