Joke Collection Website - Blessing messages - Java (for loop) programming realizes information verification when users log in.
Java (for loop) programming realizes information verification when users log in.
Public class PswVerify {/**
* @param args
*/
Public static void main(String[] args) {
// TODO automatically generates method stubs
Scanner input = new scanner (system. in);
String username = "manage
int password = 0000
for(int I = 3; I>= 1; I-)
{
System.out.println ("Please enter user name:");
string name = input . next();
System.out.println ("Please enter password:");
int pw = input . nextint();
if(name . equals(username)& amp; & amppw = = password)
{
System.out.println ("Welcome to our own shopping management system");
Break;
}
Else if (me! = 1)
{
System.out.println ("User name and password don't match!" );
System.out.println ("You still have a chance of" +(i- 1)+ ",please re-enter:");
}
other
{
System.out.println ("You have no right to access the system!" );
} }}
}
- Related articles
- The MG 6 alarm keeps ringing What happened?
- Has the Nokia 5230 mobile phone system been updated? I bought mine and never updated it. But I have received many messages from such swindlers. How is the mobile phone system updated?
- What is the express delivery by ordinary express?
- How to upgrade SMS QQ to Super Edition?
- 100 words of love confession
- 10680580 Is the SMS notification true?
- Thank you for your parents' greetings.
- How to solve the SMS protection of World of Warcraft?
- Wechat simple good morning greetings: happy day, happy mood.
- Guiyang: Encourage and guide financial institutions to implement the first set of 20% down payment policy.