public static boolean isEmailIdValid(String email){
  String expression="^[\\w\\.-]+@([\\w\\-]+\\.)+[A-Z]{2,4}$";
  Pattern pattern=Pattern.compile(expression,Pattern.CASE_INSENSITIVE);
  Matcher matcher=pattern.matcher(email);
  return matcher.matches();
}

public static boolean isEmailIdValid ( String email ) { String expression = "^[\\w\\.-]+@([\\w\\-]+\\.)+[A-Z]{2,4}$" ; Pattern pattern = Pattern . compile ( expression , Pattern . CASE_INSENSITIVE ) ; Matcher matcher = pattern . matcher ( email ) ; return matcher . matches ( ) ; }
check the email address is valid or not .
