Write a program that checks if an email is entered correctly.

• The email must have an @ symbol.

• The email must then have a period

• The period is followed by 2 or 3 characters.

Write a program that asks for an email address. Then asks to verify the email address. If the first email and the verify email must match or prompt again and tell the user why they are being prompted again. If the email does not match or the rules above, prompt again and tell the user why they are being prompted again. When email address is correctly entered tell the user their email address has been accepted. Your program should the method below that checks whether an email is valid.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

import java.util.Scanner;

public class EmailCheck {

/* Special function to avoid situations where email contains special characters (*,+,',#, ^, $) */
private static boolean checkChar(char c) {
   if((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'))
   return true;
   return false;

public static boolean isEmail(String email){
boolean r = false;
boolean a = false;
boolean b = false;
boolean c = false;
boolean at = false;
boolean sp = true;

char[] ch = email.toCharArray();

int position = 0;...
$6.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats