Thursday, February 14, 2008

Feb 14 Its My First Anniversary !

Feb 14 Its Valentines Day ..!
Then its my First Anniversary :)

Ohh.. I am not offically in Love :) , So Dont think in the other way ...
It's First Anniversary since i started Blogging. :)

Not too many post last year.. Hmmm I have to increase the counts in coming days.. Let me set the target... How much can i set the target ? 50 posts , 100 posts ?
Ohh No.. I am in confusion Its better to let the JVM to decide ,


package com.ashok.fun;

import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.SecureRandom;

public class RandomNumber {

private static final int noOfDays=366; // Hey 2008 its Leap year So...

public static void main(String args[])
{

try{

SecureRandom random=SecureRandom.getInstance("SHA1PRNG", "SUN");

System.out.println("How much Entry ,should I Blog ?");

System.out.println("JVM : Not less than "+random.nextInt(noOfDays));
}
catch(NoSuchAlgorithmException alg)
{
System.out.println(" SHA1PRNG Not there ? ");
}
catch(NoSuchProviderException nspe)
{
System.out.println("This is not SUN JVM ");
}

}
}


Ok program written.. Lets Run it..!
Here's the output

How much Entry ,should I Blog ?
JVM : Not less than 202



202 ???? Its Huge !

Let's see whether i am able to crack it ..

No comments: