Solved

A String Variable Named Email Contains the Email of a Person

Question 75

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