WHEN I put void in this method.. it says "void type not allowed here" in my if statement.
but when I erase the void in my method.. it says error: invalid method declaration; return type required in the method...
what should I do?
public void setStop(int day , int hour , int minute , int second )
{
if (0 <= day )
daysStop = day;
else
daysStop = 0;
if (0 <= hour && hour < 24 )
hoursStop = hour;
else
hoursStop = 0;
if (0 <= minute && minute < 60)
minutesStop = minute;
else
minutesStop = 0;
if (0 <= second && second < 60 )
secondsStop = second;
else secondsStop = 0;
}
/* IF STATEMENT - part of a different method*/
if (setStop ( daysStop, hoursStop, minutesStop, secondsStop) == true )