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

+17 votes
asked in CSC211_Winter2018 by (8 points)

2 Answers

+16 votes
 
Best answer

Is this issue occurring when you are trying to return a value? If so, it likely means that the method starts with something like:

public static void methodName() {

When it should be:

public static int methodName(){

if you are trying to return an integer.

answered by (8 points)
selected by
+11 votes

You use “void” when you are not returning a value from a method.
Replace “void” with they type of value you are returning from a method (Double, Int, or String).

answered by (8 points)
...