Search:

Type: Posts; User: Vessel06

Search: Search took 0.11 seconds.

  1. Replies
    5
    Views
    1,047

    [SOLVED] Re: declaring in my mutator

    But when I type

    public void setGweight(int x) {
    if (x != -0) {
    return false; //error reads saying: cannot return a value from method whose result type is void--Unnecessary return...
  2. Replies
    5
    Views
    1,047

    [SOLVED] Re: declaring in my mutator

    You know what...I totally forgot abt using an if statement! lol But she didn't say what the code is supposed to do if it detects a negative number, but to make sure that it CAN'T be a negative number...
  3. Replies
    5
    Views
    1,047

    [SOLVED] declaring in my mutator

    :confused:


    So this is a hw assignment and I'm having a little trouble with it. I am a beginner (first programming class EVER) but I'm a quick learner so bare with me lol :-)

    The assignment is...
Results 1 to 3 of 3