Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Email Validation Challenge | String Advanced
Java Extended
course content

Contenido del Curso

Java Extended

Java Extended

1. Deep Java Structure
2. Methods
3. String Advanced
4. Classes
5. Classes Advanced

bookEmail Validation Challenge

Tarea

Your task is to implement email validation by trimming any leading and trailing spaces from the string. Then, check the email's validity based on three conditions: there must be characters before the @ symbol, there must be characters after the @, and the domain after the @ must contain a dot. If the email is valid, extract and display the domain (the part after the @ symbol, excluding the symbol itself).

  1. In the validateEmail method, find the index of the @ symbol in the email.
  2. In the validateEmail method, find the index of the first dot (.) symbol in the email.
  3. Check that the @ index is greater than 0, and the dot index is greater than the @ index and less than the length of the email minus 1.
  4. In the extractDomainFromEmail method, find the index of the @ symbol in the ``email`.
  5. Extract and return the substring starting from the character immediately after @ in the extractDomainFromEmail method.
  6. In the main method, trim any leading and trailing spaces from the email string.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 3. Capítulo 7
toggle bottom row

bookEmail Validation Challenge

Tarea

Your task is to implement email validation by trimming any leading and trailing spaces from the string. Then, check the email's validity based on three conditions: there must be characters before the @ symbol, there must be characters after the @, and the domain after the @ must contain a dot. If the email is valid, extract and display the domain (the part after the @ symbol, excluding the symbol itself).

  1. In the validateEmail method, find the index of the @ symbol in the email.
  2. In the validateEmail method, find the index of the first dot (.) symbol in the email.
  3. Check that the @ index is greater than 0, and the dot index is greater than the @ index and less than the length of the email minus 1.
  4. In the extractDomainFromEmail method, find the index of the @ symbol in the ``email`.
  5. Extract and return the substring starting from the character immediately after @ in the extractDomainFromEmail method.
  6. In the main method, trim any leading and trailing spaces from the email string.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 3. Capítulo 7
toggle bottom row

bookEmail Validation Challenge

Tarea

Your task is to implement email validation by trimming any leading and trailing spaces from the string. Then, check the email's validity based on three conditions: there must be characters before the @ symbol, there must be characters after the @, and the domain after the @ must contain a dot. If the email is valid, extract and display the domain (the part after the @ symbol, excluding the symbol itself).

  1. In the validateEmail method, find the index of the @ symbol in the email.
  2. In the validateEmail method, find the index of the first dot (.) symbol in the email.
  3. Check that the @ index is greater than 0, and the dot index is greater than the @ index and less than the length of the email minus 1.
  4. In the extractDomainFromEmail method, find the index of the @ symbol in the ``email`.
  5. Extract and return the substring starting from the character immediately after @ in the extractDomainFromEmail method.
  6. In the main method, trim any leading and trailing spaces from the email string.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Tarea

Your task is to implement email validation by trimming any leading and trailing spaces from the string. Then, check the email's validity based on three conditions: there must be characters before the @ symbol, there must be characters after the @, and the domain after the @ must contain a dot. If the email is valid, extract and display the domain (the part after the @ symbol, excluding the symbol itself).

  1. In the validateEmail method, find the index of the @ symbol in the email.
  2. In the validateEmail method, find the index of the first dot (.) symbol in the email.
  3. Check that the @ index is greater than 0, and the dot index is greater than the @ index and less than the length of the email minus 1.
  4. In the extractDomainFromEmail method, find the index of the @ symbol in the ``email`.
  5. Extract and return the substring starting from the character immediately after @ in the extractDomainFromEmail method.
  6. In the main method, trim any leading and trailing spaces from the email string.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 3. Capítulo 7
Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
some-alt