Generating random alpha-numeric string in Java

In the following example java.util.random is used to generate alpha-numeric string based on the length supplied user.

Example

import java.util.Random;

public class Secu {

	// set of keys
	static final String AB = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*";

	// calling randon class
	static Random rnd = new Random();

	// generating function
	static String randomString(int len) {
		StringBuilder sb = new StringBuilder(len);
		for (int i = 0; i < len; i++)
			sb.append(AB.charAt(rnd.nextInt(AB.length())));
		return sb.toString();
	}

	public static void main(String[] args) {
		System.out.println(randomString(12));

	}
}