Dimenticare icon

Random strings

Dimenticare | PRO | 01/03/13 10:56:06 PM UTC | 0 ⭐ | 597 👁️ | Never ⏰ | []
Java |

340 B

|

None

|

0 👍

/

0 👎

import java.util.Random;
public class strings {
    public static void main(String[] agrs){
        Random r=new Random();
        char[] set={'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
        for (int i=0; i<40; i++){
            System.out.print(set[r.nextInt(26)]);
        }
    }
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎