+ 5
Do I use an array to keep values, or just individual values for things like skill points.
I'm wondering if you would use an array to organize values like skill points, or to just store them in individual values?
4 Antworten
+ 1
Arrays are very good for storing data of similar type. You could use integer arrays. It will be easier to access also. If you have like 50 peoples skill points. Making 50 variable for one purpose doesn't seem like a great idea.
+ 2
Ok, thanks. I was thinking of only storing individual arrays. Storing 50 arrays in one array is excessive. Maybe add the arrays to a list if it comes about. But this is what I needed.
+ 2
An array is a container object that holds a fixed number of values of a single type. The length of an array is established when the array is created. After creation, its length is fixed. You have seen an example of arrays already, in the main method of the "Hello World!"
0
I would use an array with the skills as indexers.