How to get back to home page after 3 wrong input in log in page in java? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to get back to home page after 3 wrong input in log in page in java?

I am in a simple console printout hospital management project.can u help me please to let me know the src code.

30th Jan 2018, 4:37 PM
Sagnik Mondal
Sagnik Mondal - avatar
1 Answer
0
You just need to have an int that counts up whenever you enter a wrong password, if the integers value is 3, you send the person back. Don't forget to reset the counter in some cases you might have, for example: When he's getting sent back you need to reset it so it can count up once again.
31st Jan 2018, 3:10 PM
Paul Draheim