fork(2) download
  1. import java.util.Random;
  2.  
  3. class Ideone {
  4. public static void main(String[] args) {
  5. String letras = "ABC";
  6. Random gerador = new Random();
  7. System.out.println(letras.charAt(gerador.nextInt(letras.length())));
  8. }
  9. }
  10.  
  11. //https://pt.stackoverflow.com/q/39951/101
Success #stdin #stdout 0.06s 2184192KB
stdin
Standard input is empty
stdout
C