Attachment 'Password.java'
Download 1 import javax.swing.JOptionPane;
2
3
4 public class Password {
5
6 public static void main(String[] args) {
7
8 boolean passwordCorretta = false;
9 while ( !passwordCorretta )
10 {
11 String pass = JOptionPane.showInputDialog("Inserisci Password");
12
13 if (pass.equals("ciccio"))
14 passwordCorretta = true;
15 else
16 JOptionPane.showMessageDialog(null, "Password sbagliata");
17 }
18 JOptionPane.showMessageDialog(null, "Bravo hai indovinato");
19 }
20
21
22 }
Attached Files
You are not allowed to attach a file to this page.