Closed angel96 closed 5 years ago
SimpleDateFormat formato = new SimpleDateFormat("yyyy/MM/dd"); Date d = new Date(); String formated = formato.format(d).replace("/", ""); Character[] ch = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' }; String c = ""; Random random = new Random(); for (int i = 0; i < 6; i++) { c += ch[random.nextInt(ch.length)]; } System.out.println(formated+"-"+c);
Falta implementarlo en una clase utiles en el proyecto.
Implementado. Cierro la issue.