Although very detailed answers are already added, I think those are complex enough for a developer who is just looking for a simple method to validate an email address or to get all email addresses from a string in Java.
public static boolean isEmailValid(@NonNull String email) { return android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches();}
As per the regular expression is concerned, I always use this regular expression, which works for my problems.
"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}"
If you are looking to find all email addresses from a string by matching the email regular expression. You can find a method at this link.