public void kangarooJump(Kangaroo aKangaroo)
{
ranNumber.nextInt(7);
for (int jumps = 0; jumps < getRanNumber(); jump ++)
{
aKangaroo.jump();
}
}
If you're doing Math.random(), then one of your problems is that you're trying to set a for loop to run for a fraction of a time. You might be setting it to
for(int jumps = 0; jumps < 0.1; jumps++)
You can't have a loop do a fraction of an iteration. You should probably rather use
Random randGenerator = new Random();
int number = randGenerator(7);
for(int jumps = 0; jumps<number; jumps++)
That should fix your problem. Hope that helped!