public static boolean isValidName(String name){
  if (name == null) {
    return false;
  }
  return name.length() > 3;
}

public static boolean isValidName ( String name ) { if ( name == null ) { return false ; } return name . length ( ) > 3 ; }
verifies that the specified name is valid for our service . < p / > in this example , we only require that the name is at least four characters . in your application , you can use more complex checks to ensure that usernames , passwords , email addresses , urls , and other fields have the proper syntax .
