Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+19 votes
asked in CSC211_Winter2018 by (1 point)

4 Answers

+12 votes

A method can have multiple return statements.

answered by (1 point)
reshown by
+12 votes

Yes that is possible.

answered by (1 point)
+12 votes

No. A method can only return one value. An error will appear if you try to return 2 values.

answered by (1 point)
+12 votes

A method can return only one value. However, it can return different values in different paths. If you return two values in one condition, it won't compile.

answered by (1 point)
...