Question: Write an application that inputs a telephone number as a string in the form (555) 555-5555. The application should use String method split to extract
Write an application that inputs a telephone number as a string in the form (555) 555-5555. The application should use String method split to extract the area code as a token, the first three digits of the phone number as a token and the last four digits of the phone number as a token. The seven digits of the phone number should be concatenated into one string. Both the area code and the phone number should be printed. Remember that you’ll have to change delimiter characters during the tokenization process.
Step by Step Solution
3.42 Rating (155 Votes )
There are 3 Steps involved in it
Sure to achieve this in Java you can use the method split of the String class Here is the code java ... View full answer
Get step-by-step solutions from verified subject matter experts
