Solved

A String Variable Named Email Contains the Email of a Person

Question 14

Essay

A String variable named email contains the email of a person in this format: username@serviceProvider.extension. Examples are mike32@yahoo.com and jane21@gmail.com. For simplicity, assume that there is exactly one @ character and one . (dot) character in the String email, and that the @ character is before the . (dot) character.
Output the username, the service provider, and the extension of email.

Correct Answer:

verifed

Verified

int indexOfAt = email.indexOf( '@' );
in...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents