Android generates random numbers
Public void getCharAndNumr () {// String val = "", va = ""; String a = "", B = "", c = "", d = ""; random random = new Random (); // for (int I = 0; I <1; I ++) // {// String charOrNum = random. nextInt (2) % 2 = 0? "Char": "num"; // output letter or number // if ("char ". equalsIgnoreCase (charOrNum) // string // if (true) // {int choice = random. nextInt (2) % 2 = 0? 65: 97; // get uppercase or lowercase letters // a + = (char) (choice + random. nextInt (26); B ++ = (char) (choice + random. nextInt (26); choice = random. nextInt (2) % 2 = 0? 65: 97; // whether to use uppercase or lowercase letters a + = (char) (choice + random. nextInt (26); // else if ("num ". equalsIgnoreCase (charOrNum) // number // if (true) // {// val + = String. valueOf (random. nextInt (10); // int choice = random. nextInt (2) % 2 = 0? 65: 97; // get uppercase or lowercase letters // a + = (char) (choice + random. nextInt (26); // B + = (char) (choice + random. nextInt (26); //} TextView tw1 = (TextView) findViewById (R. id. textView3); // String a = "", B = ""; c = String. valueOf (int) (Math. random () * 9 + 1); d = String. valueOf (int) (Math. random () * 9 + 1); tw1.setText (a + "" + c + "" + B + "" + d + ""); /// ContentValues values = new ContentValues (); // values. put ("name", tw1.getText (). toString (); // db. insert ("tb_1", null, values );}