Here you can find the source of generatePassword()
private static String generatePassword()
//package com.java2s; import java.util.Random; public class Main { private static String generatePassword() { int randomInt = new Random().nextInt(1000000); return String.valueOf(randomInt); }/*from w w w. j a va2s.co m*/ }