I need help finding the output of an email address program in java?
-
My teacher wants us to: Write a program that accepts a user's email address, then finds and outputs the username and address’ site type. (USING STRING ONLY) These are the acceptable site types - com, net, gov, org, mil, and edu. (Ex. Please enter your email address: [email protected] Your username is apple Your site type is commercial) If you have any questions about the directions, please let me know. Help would be greatly appreciated!! Thanks :)
-
Answer:
Because email addresses use a strict format, you can parse the string for the last occurrence of a period and then store the remaining characters in a variable. Then, use that variable to look up the site type in some sort of selection set or case statement.
dukedogt... at Yahoo! Answers Visit the source
Related Q & A:
- I need help with an email.Best solution by Yahoo! Answers
- I need help with writing up the Java Code.Best solution by Yahoo! Answers
- I need help sending pictures internationally through email.Best solution by Yahoo! Answers
- NEED HELP FINDING A YOUTUBE VIDEO?Best solution by Yahoo! Answers
- I need help finding a photographer.Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.