Skip to content

Instantly share code, notes, and snippets.

@parzibyte

parzibyte/lecturas.java Secret

Created Jan 7, 2020
Embed
What would you like to do?
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