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

User Denkeni
by
6.2k 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
User Chirag Sanghvi
by
5.9k points