Checking if a method is set
<p>"a fourth field to keep track of whether or not the alarm is set; alternatively, you could set the alarm fields to a negative value (-1 is my favorite)." Please help, I am trying to create a field which checks if my method is set. I've tried an if and statement so far but it probably is not the way to go. I need to check that my alarm is set. Probably going to need a return value then right?</p>

<pre><code>public void setAlarm (int hours, int minutes, int seconds)
{
    if(hours minutes seconds &gt; 0) {
        alarmHour = hours;
        alarmMinute = minutes;
        alarmSecond = seconds;
    }
    else {
        System.out.println("Please set the alarm.");
    }
}
</code></pre>
