I am creating a gwt application.I get the error “The constructor Random() is not visible” in the method below.I have tried putting it in the main onModuleLoad() as well.
public void jump(){
Random generator = new Random();
}
I have imported random via the following
import com.google.gwt.user.client.Random;
No matter where I put this I still keep getting that error.
Thanks
Don’t instantiate it. Instead, call the static methods on the class: