Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   I am new to java and need help with a Java program that disects a phone number. (http://www.go4expert.com/forums/i-java-help-java-program-disects-phone-t21830/)

dwlr00 18Apr2010 15:23

I am new to java and need help with a Java program that disects a phone number.
 
I need help with a java program that disects a phone number and looks like this when it prints out.

Code:

PHONE NUMBER DISSECTOR   
Enter a phone number in the form cc-area-local,
where cc = country code digits, area = area code digits,
and local = local phone digits.
Or enter q to quit:
1-816-7412000 begin_of_the_skype_highlighting              1-816-7412000      end_of_the_skype_highlighting
country code = 1
area code = 816
local phone number = 7412000
Enter a phone number in the form cc-area-local,
where cc = country code digits, area = area code digits,
and local = local phone digits.
Or enter q to quit:
86-131-12345678
country code = 86
area code = 131
local phone number = 12345678
Enter a phone number in the form cc-area-local,
where cc = country code digits, area = area code digits,
and local = local phone digits.
Or enter q to quit:
Q
Press any key to continue . . .

Any help would be greatly appreciated.


All times are GMT +5.5. The time now is 09:18.