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.

Last edited by shabbir; 19Apr2010 at 09:09.. Reason: Code blocks