Here you can find the source of randomSuccess()
public static boolean randomSuccess()
//package com.java2s; //License from project: Apache License public class Main { public static boolean randomSuccess() { int x = (int) (Math.random() * 100); return x > 10; }/*from www .j a v a 2 s .c o m*/ }