Java Random randomFailure()

Here you can find the source of randomFailure()

Description

random Failure

License

Apache License

Declaration

public static boolean randomFailure() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static boolean randomFailure() {
        return !randomSuccess();
    }/*from w w w .j a  v a2s  .  c om*/

    public static boolean randomSuccess() {
        int x = (int) (Math.random() * 100);
        return x > 10;
    }
}

Related

  1. randomElementFromArray(T[] source)
  2. randomEntre1eh100()
  3. randomEnum(Class clazz)
  4. randomEvent(float theChance, float theRange)
  5. randomException()
  6. randomFloat(float aVal)
  7. randomFloat(float min, float max)
  8. randomFloatBetween(float begin, float end)
  9. randomFromIterator(Iterator iter)