1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

I am new to java and need help with a Java program that disects a phone number.

Discussion in 'Java' started by dwlr00, Apr 18, 2010.

  1. dwlr00

    dwlr00 New Member

    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 a moderator: Apr 19, 2010

Share This Page