Java Password Generate generatePassword()

Here you can find the source of generatePassword()

Description

generate Password

License

Open Source License

Declaration

public static String generatePassword() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Random;

public class Main {
    private static String random_str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";

    public static String generatePassword() {
        String password = "";
        for (int i = 0; i < 30; i++) {
            Random rand = new Random();
            password += random_str.charAt(rand.nextInt(random_str.length()));
        }/*from w  w w . j  ava2  s  . c om*/
        return password;
    }
}

Related

  1. generatePassword()
  2. generatePassword()
  3. generatePassword()
  4. generatePassword()
  5. generatePassword()