private boolean validateEmail(final String email){
  if (email.isEmpty()) {
    badEmailTitle="Email address is empty";
    badEmailReason="You didn't enter an email address.\n";
    return false;
  }
 else {
    if (!email.contains("@") || !email.contains(".") || (email.length() <= 5)) {
      badEmailTitle="Misspelled email address?";
      badEmailReason="The email address you entered is probably misspelled.\n";
      return false;
    }
  }
  return true;
}

private boolean validateEmail ( final String email ) { if ( email . isEmpty ( ) ) { badEmailTitle = "Email address is empty" ; badEmailReason = "You didn't enter an email address.\n" ; return false ; } else { if ( ! email . contains ( "@" ) || ! email . contains ( "." ) || ( email . length ( ) <= 5 ) ) { badEmailTitle = "Misspelled email address?" ; badEmailReason = "The email address you entered is probably misspelled.\n" ; return false ; } } return true ; }
validate email field format .
