Method that returns true or false at x percentage
<p>i'm looking for a method that answers randomly true or false by a given percentage Integer. for example:</p>

<pre><code>percent(100); //Will always 100% return true
percent(50); //Will return 50% true, or 50% false
percent(0); //Will always 100% return false, etc..
</code></pre>

<p>Here is what I came up with, but for some reason it's not working as it should be:</p>

<pre><code>public static boolean percent(int percentage)
{
    Random rand = new Random();
    return ((rand.nextInt((100-percentage)+1))+percentage)&gt;=percentage;
}
</code></pre>

<p>I need a very accurate and real method, please help it's too complicated it's giving me a headache</p>
