animal function

String animal()

Return a random animal from the animals list.

Returns: A random animal from the animals array.

Implementation

String animal() {
  return animals[Random().nextInt(animals.length)];
}