Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created January 7, 2020 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/81bbf4e30c64a93c4db90a9fd125c5c6 to your computer and use it in GitHub Desktop.
Save parzibyte/81bbf4e30c64a93c4db90a9fd125c5c6 to your computer and use it in GitHub Desktop.
private static String obtenerSuposicionDeUsuario(int longitud) {
String eleccion = "";
while (eleccion.length() != longitud) {
System.out.println("¿Cuál crees que es la contraseña?: ");
Scanner sc = new Scanner(System.in);
eleccion = sc.nextLine();
}
return eleccion;
}
private static boolean obtenerConRepetidos() {
System.out.println("¿Puede incluir repetidos? 1 = sí. 0 = no ");
return new Scanner(System.in).nextInt() == 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment