How do I generate random string?

package org.kodejava.example.security;

import java.security.SecureRandom;
import java.util.Random;

public class RandomString {
    public static final String SOURCES =
            "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";

    public static void main(String[] args) {
        RandomString rs = new RandomString();
        System.out.println(rs.generateString(new Random(), SOURCES, 10));
        System.out.println(rs.generateString(new Random(), SOURCES, 10));
        System.out.println(rs.generateString(new SecureRandom(), SOURCES, 15));
        System.out.println(rs.generateString(new SecureRandom(), SOURCES, 15));
    }

    /**
     * Generate a random string.
     *
     * @param random the random number generator.
     * @param characters the characters for generating string.
     * @param length the length of the generated string.
     * @return
     */
    public String generateString(Random random, String characters, int length) {
        char[] text = new char[length];
        for (int i = 0; i < length; i++) {
            text[i] = characters.charAt(random.nextInt(characters.length()));
        }
        return new String(text);
    }
}

Example string produced by the code snippets are:

uxEUFqTqS0
vr89vdF4gh
ysYF9XEHhO5FtDf
aBANhrLObZ1XLJi

How do I create random number?

package org.kodejava.example.lang;

public class RandomExample {
    public static void main(String[] args) {
        // The Math.random() returns a random number between 0.0 and 1.0 
        // including 0.0 but not including 1.0.
        double number = Math.random();
        System.out.println("Generated number: " + number);

        // By multiplying Math.random() result with a number will give
        // us a range of random number between, for instance 0.0 to 10.0 as
        // shown in the example below.
        number = Math.random() * 10;
        System.out.println("Generated number: " + number);

        // To get a random number from n to m we can add a n value to the
        // Math.random() as the lowest number and then multiply it with the
        // the highest number. The example below creates random number
        // between 100.0 and 200.0.
        number = 100 + (Math.random() * 100);
        System.out.println("Generated number: " + number);

        // Creates an integer random number
        int random = 100 + (int) (Math.random() * 100);
        System.out.println("Generated number: " + random);
    }
}

Here is an example result of our program.

Generated number: 0.670447515721026
Generated number: 5.118459516569203
Generated number: 139.89504952544274
Generated number: 158