Think of your phone number or social security number write


Numbers with embedded dashes play a huge role in our lives.

Think of your phone number, or Social Security number. Write a program that uses a Scanner to take a single user input.

You may assume this input contains no spaces, and consists of any number of digits with two dashes. Use only String's indexOf lastndexOf and substring methods.

Sample input might be 123-45-6789 Or 919-555-1212 Your program should remove the dashes and print the digits.

The output for the above input would be 123456789 and 9195551212

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Think of your phone number or social security number write
Reference No:- TGS02877940

Expected delivery within 24 Hours