import java.util.Scanner;

public class Regesit
{
	String userName;
	String password;
	public static void main(String[] args) 
	{
		Scanner sc = new Scanner(System.in);
		Regesit regesit1 = new Regesit();

		do
		{
			System.out.print("请输入用户名：");
			regesit1.userName = sc.next();
			System.out.print("请输入密码:");
			regesit1.password = sc.next();
			if (!regesit1.regesit(regesit1.userName, regesit1.password))
			{
				System.out.println("用户名长度不能小于3，密码长度不能小于6！");
			}
			else 
			{
				System.out.print("请再输入密码:");
				if (regesit1.regesit(sc.next()))
				{
					System.out.print("注册成功，请记住用户名和密码");
					break;
				}
			}
		}
		while(true);

	}
	public boolean regesit(String userName, String password)
	{

		if (userName.length() < 3 || password.length() < 6) 
		{
			return false;
		}
		return true;
	}
	public boolean regesit(String password)
	{
		if (password.equals(this.password)) 
		{
			return true;
		}
		return false;
	}
}