Java Help

Discussion in 'Programming & Scripting' started by h2o pete, Nov 7, 2008 with 2 replies and 185 views.

  1. h2o pete

    h2o pete Banned Retired

    Messages:
    4,559
    Ratings:
    524
    I don't know what to do for this exercise :\

    "Define an accessor method getTotal that returns the value of the total field. Include it in your project"


    Is this right:

    public int getTotal(){ return total; }

    Next question:

    How can we tell just from its signature that createString is a method not a constructor? Give two reasons.
    public String createString (int input)

    it has parameters so it can't be a constructor?

    idk
     
  2. Amurka

    Amurka Contributor

    Messages:
    1,630
    Ratings:
    343
    Since this was like three weeks ago I assume you don't need help with this anymore..? I can help in the future if you need it.
     
  3. OP
    h2o pete

    h2o pete Banned Retired

    Messages:
    4,559
    Ratings:
    524
    Yeah I got this one now :smile:. But thanks, if I need help I'll be in touch :smile:.