Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+19 votes
asked in CSC211_Winter2018 by (25 points)

4 Answers

+12 votes

A method can have multiple return statements.

answered by (8 points)
reshown by
+12 votes

Yes that is possible.

answered by (8 points)
+12 votes

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

answered by (8 points)
+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 (8 points)
...