Wednesday, December 13, 2017

Mobile Number Validation in java or Android

private boolean ismobileValidation(String s) {
    if(s.toString().length()>=10 &&  s.toString().startsWith("7") || 
       s.toString().startsWith("8") || s.toString().startsWith("9"))
    {

        return true;
    }

    else    {
        return false;
    }
}

No comments:

Post a Comment

Featured Post

What is JavaScript? What is the role of JavaScript engine?

  The JavaScript is a Programming language that is used for converting static web pages to interactive and dynamic web pages. A JavaScript e...