Android Random String Create randomString(int size)

Here you can find the source of randomString(int size)

Description

random String

Declaration

public static String randomString(int size) 

Method Source Code

//package com.java2s;

public class Main {
    public static String randomString(int size) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < size; i++) {
            sb.append((char) (((int) 'A') + Math.random() * 25));
        }/*from ww  w.  ja v  a2  s . c  o m*/
        return sb.toString();
    }
}

Related

  1. getRandomString(int len)
  2. getRandomStr(int length)
  3. getRandomString(int length)
  4. randomIVString()
  5. getRandomString()
  6. getRandomPwd()
  7. genRandomString(int pLength)