An instance of Random (see API) will provide you with a "stream of pseudorandom numbers." If desired, you can seed Random with a long, so you could use System.currentTimeMillis() -- although I don't see why you would use this in place of Random's no-args constructor.
With an instance of Random, you can get "random" primitives by calling the appropriate methods. You can then convert these to Strings using wrapper class toString methods. For example...
Can you describe more about the output you're trying to get?
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
Joined: Mar 14, 2006
Thanks for the reply.
I didnt phrase the question correctly sorry, here i will try and explain what i would like to do.
I would like to append date to a long number.
So I thought one can use the java.util.Random class, get a long random number, then somehow append date to it.
This i need to convert to a string and display.
Hope I have explained what needs to be done properly this time.
A reply would be appreciated, some examples too would be good.