Welcome to the Treehouse Community
Looking to learn something new?
Declare an int variable named 'numberOfFrogs' and set it to the number of elements in the array using the array's 'length' property.
ans -int NumberOfFrogs = randomGenerator.nextInt(answers.length);
but there is an something error.please help me what is the solution.
It looks like you need to assign the length of the array (arrayName.length) to the variable 'numberofFrogs'. In this case you don't need a random generator:
int NumberOfFrogs = arrayName.length; //replace arrayName with whatever variable you're using for the array
this link might help: