JAVA array help.

Associate
Joined
8 Nov 2005
Posts
56
:confused: If anybody could point me in the right direction as to why I cannot do this.

Code:
int valueOfCoin = validCoins[index].getValue( );

validCoins is a valid array and index is a valid variable containing a number that chooses which line of the array to get the value of.

getValue() is a method within a different class that just returns an integer.

I might not have given enough information to answer this question but anybody have any ideas?
 
Ah, it was my fault, it does work was looking at an older class file! Keeping track of which version of my class I need is a pain when working across multiple systems!
 
Back
Top Bottom