I doubt there is such a thing that does what you are asking. You are going to have to write it yourself.
Do you have a specific question?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Joined: Jun 29, 2002
Yup i want to generate random number, i know there are random number generators out there, i was just wondering of there is one that will generate numbers specic to a size given, so say give it a parameter 8 it will generate 8 numbers.
That will not quite work. If you obtain a number < 1000000, you will not put 6 digits into your string builder.
And why are you using substring when there is a StringBuilder method which will reduce the output to n characters before you return it as a String?
And did you ever obtain the same printout ten times?
Tony Evans wrote:Thanks that put me in the right direction
As Campbell said, that won't work.
Possibly closer is Jesper's suggestion; but best of all: back up and tell us exactly what it is you want to do, because right now we're floundering around in the dark. I'm still not sure if you want 8 numbers, or an 11-digit number (or indeed, what an "11-digit number" means to you), or both, or some combination of either.
Bats fly at night, 'cause they aren't we. And if we tried, we'd hit a tree -- Ogden Nash (or should've been).
Articles by Winston can be found here
Joined: Oct 13, 2005
Earlier, I wrote:. . . If you obtain a number < 1000000, you will not put 6 digits into your string builder. . . .