Android random string doesn't check
<p>Random string works fine.</p>

<p>Doesn't work check now.
I enter the text to what has been EditText drawn.</p>

<p>But the check is not working. Why?
Code: </p>

<pre><code>    public static StringBuffer random() {
        String str = new String(
                "G12HIJdefgPQRSTUVWXYZabc56hijklmnopqAB78CDEF0KLMNO3rstu4vwxyz9");
        StringBuffer sb = new StringBuffer();
        sb.toString();
        String ar = null;
        Random r = new Random();
        int te = 0;
        for (int i = 1; i &lt;= 10; i++) {
            te = r.nextInt(62);
            ar = ar + str.charAt(te);
            sb.append(str.charAt(te));
        }
        return sb;
    }

    public void onCreate(Bundle icicle) {
        setContentView(R.layout.main);
        random = random().toString();
        TextView display = (TextView) findViewById(R.id.textView1);
        display.setText("Random Number: " + random); // Show the random number
        et = (EditText) findViewById(R.id.etNumbers);
        ok = (Button) findViewById(R.id.button1);
        ok.setOnClickListener(this);

    }

    public void onClick(View arg0) {
        // TODO Auto-generated method stub
        try {
            charsEntered = et.getText().toString();
        } catch (NumberFormatException nfe) {
            Toast.makeText(et.getContext(), "Bla bla bla", Toast.LENGTH_LONG)
                    .show();
        }

        if (random == charsEntered) {
            Toast.makeText(et.getContext(), "Good!", Toast.LENGTH_LONG).show();
        } else {
            Toast.makeText(et.getContext(), "Bad!", Toast.LENGTH_LONG).show();
        }
    }
}
</code></pre>
