Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static boolean isPasswordValid(String password) {

        if (password.length() != 6)
            return false;

        for (int i = 0; i < password.length(); i++) {
            if (!Character.isDigit(password.charAt(i)))
                return false;
        }

        return true;
    }
}