Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static boolean isPwd(String pwd) {
        String regex = "^[0-9a-zA-Z]{6,16}$";/* "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,12}$" */
        ;
        if (!pwd.matches(regex)) {
            return false;
        } else
            return true;
    }
}