comprobacontrasinais java

Solutions on MaxInterview for comprobacontrasinais java by the best coders in the world

showing results for - "comprobacontrasinais java"
Gianluca
01 Oct 2019
1import java.util.Scanner;
2
3public class ComprobaContrasinais {
4
5	public static void main(String[] args) {
6		Scanner teclado = new Scanner(System.in);
7		
8		//D
9		
10		String clave1;
11		String clave2;
12		String mensaje;
13		
14		//E
15		
16		System.out.println("Introduza contrasinal: ");
17			clave1 = teclado.nextLine();
18		
19		System.out.println("Repita contrasinal: ");
20			clave2 = teclado.nextLine();
21		
22		//P
23		
24		if (clave1.equals(clave2)) {
25			mensaje = "As contrasinais coinciden";
26		} else {
27			mensaje = "As contrasinais NON coinciden.";
28		}
29		
30		//S
31		
32		System.out.println(mensaje);
33		
34	}
35
36}
similar questions
queries leading to this page
comprobacontrasinais java