Results 1 to 4 of 4
  1. #1
    programcı is offline Member
    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    0

    Default array of objects

    Hi,
    in my project i have players who connect the game and they have soldier,farm,catapult as much as they want,i need to use array of objects, but i don't know how to use array of objects to my project also what part of the project should contain methods for soldier,farm etc .

  2. #2
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    Some of those questions are dependant on what you want.

    As far as an array of objects, it's the same as any other array
    Java Code:
    type[] x = new type[x]

  3. #3
    Dark's Avatar
    Dark is offline Senior Member
    Join Date
    Apr 2011
    Location
    Camp Lejuene, North Carolina
    Posts
    643
    Rep Power
    4

    Default

    Have you even started programming this yet? It sounds like you're trying to accomplish something extremely higher than your current skill level.

    Spend some time in the API's and Tutorials and you'll learn lots of neat things.

  4. #4
    programcı is offline Member
    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    0

    Default

    Thanks for advices, but this is my assignment and i have to do it,(we had just 3 java lessons) Actually some piece of array of objects examples and these class definitions used in these exaples would be very helpful

Similar Threads

  1. Array of objects
    By Saletra in forum New To Java
    Replies: 2
    Last Post: 07-31-2010, 01:16 PM
  2. Array of Objects
    By sfe23 in forum New To Java
    Replies: 19
    Last Post: 02-04-2009, 06:57 PM
  3. Array of objects
    By rosh72851 in forum New To Java
    Replies: 5
    Last Post: 10-31-2008, 05:03 AM
  4. Array of Objects
    By bluefloyd8 in forum New To Java
    Replies: 5
    Last Post: 01-22-2008, 07:27 PM
  5. Array with objects
    By toby in forum New To Java
    Replies: 1
    Last Post: 07-25-2007, 10:50 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
  •