check Password, letter and digit, 6 to 15 character long - Android java.security

Android examples for java.security:Password

Description

check Password, letter and digit, 6 to 15 character long

Demo Code


//package com.java2s;

public class Main {

    public static boolean checkPassword(String password) {
        if (password == null || password.isEmpty()) {
            return false;
        }/*from  www  .  ja v  a 2  s .  c  om*/
        if (password.matches("([a-z]|\\d){6,15}")) {
            return true;
        }
        return false;
    }
}

Related Tutorials