I have a code and it gives me 4 errors every time that I compile my code, I don't know what is wrong with my code.
Can someone help me please???? I am using boolean variables here is part of the code:
{
boolean done= false;
while(!done)
{
String password= JOptionPane.showInputDialog(null, "Enter Password:");
if (password==null)
{
finish();
}
try
{
if (checkPassword==true)
{
done = true;
}
}
catch
{}
JOptionPane.showMessageDialog(null, "Your entry was incorrect! Please try again...", null, JOptionPane.ERROR_MESSAGE);
}
JOptionPane.showMessageDialog(null, "Your entry was correct!");
}
}
public static void finish()
{
System.exit(0);
}