Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

java number split

Name: Anonymous 2012-05-03 6:50

sup javafags,
how can I split a 50 character long number into blocks of 5?

I created a random number generator to generate me a long block of 50 random numbers, but I need to break it all up in blocks of 5 so I have 10 blocks of 5 numbers.

How can I do this?

Name: Anonymous 2012-05-04 18:59


void homework(String str){
    int parts[10];
    for(int i=0; i<10; ++i)
        parts[i] = str.substring(i*5, (i+1)*5);
    ...

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List