array of objects
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 .
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
type x = new type[x]
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.
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