Results 1 to 2 of 2
  1. #1
    ConMan is offline Member
    Join Date
    Jun 2010
    Rep Power

    Default How do I modify the values in an object array?

    Hello, I am new to these forums, and i would like to know how one would go about modifying the values for a particular object in an object array.

    For example, say I had a constructor for an object of type "Car", having 2 integer variables, written in "Car" class.

    I then create an array of type "Car" with a length of 10 in my test class.

    How would I modify the 2 integer values?

    Would I need a mutator method in my Car class to do this?

    Thanks for your help ahead of time. :)

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

Similar Threads

  1. Printing values from object in Array?
    By thesinter in forum New To Java
    Replies: 3
    Last Post: 01-20-2010, 06:19 AM
  2. Assigning values to an object
    By camper2 in forum New To Java
    Replies: 4
    Last Post: 04-05-2009, 03:13 AM
  3. passing object as value for checkbox values??
    By Pooja Deshpande in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 03-17-2009, 12:55 PM
  4. Replies: 0
    Last Post: 11-21-2008, 09:17 AM
  5. [SOLVED] Creating List of Values Using ClipBoard Object
    By Judoon_Platoon in forum Java Applets
    Replies: 2
    Last Post: 05-21-2008, 08:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts