Here you can find the source of randomFishType()
public static long randomFishType()
//package com.java2s; //License from project: Open Source License import java.util.Random; import java.util.concurrent.ThreadLocalRandom; public class Main { public static final Random random = ThreadLocalRandom.current(); public static long randomFishType() { return random.nextInt(4); }/*from w w w . jav a 2s. c o m*/ }