Invoking methods on objects in java.
- by David
If i have a class called Dice which contains this method:
public void roll ()
{
this.x = randNum(1, this.sum.length) ;
this.sum[x] ++ ;
}
And i am in a diferent class how do i invoke this method?
I am currently trying InstanceOfObjectName.Dice.roll and its not working. What should i do?