That will not work - cause Inputreader is waiting for some input stream and not for an assigned value.
You do not need to do all of the above. Just create a random number from scratch:
Random oRandom = new Random();
int iRandom = oRandom.nextInt(100);
You can find some more examples here:
http://www.javapractices.com/topic/TopicAction.do?Id=62[
^]