Introduction
Here is the source code for Main.java
Source
//package com.java2s;
public class Main {
private static final String PASSWORD_PATTERN = "^\\w{4,12}$";
public static boolean validatePassword(String password) {
return password != null && password.matches(PASSWORD_PATTERN);
}
}