1 /**2 * Mobile phone number belongs to carrier query3 * @paramPhone4 */5 Public Static voidmobileoperator (String phone) {6 //cmcc-China Mobile phone number rules7String Cmccregex = "^[1]{1} (([3]{1}[4-9]{1}) | ( [5] {1} [89] {1})) [0-9] {8}$ ";8 //cucc-China Unicom mobile phone number rules9String Cuccregex = "^[1]{1} (([3]{1}[0-3]{1}) | ( [5] {1} [3] {1})) [0-9] {8}$ ";Ten //cnc--China netcom 3G Mobile phone number rules OneString Cncregex = "^[1]{1}[8]{1}[89]{1}[0-9]{8}$"; A - if(Phone.length ()!=11){ -System.out.println ("Mobile phone number must be 11-bit"); the}Else if(Phone.matches (Cuccregex)) { -SYSTEM.OUT.PRINTLN ("China Unicom's mobile phone number")); -}Else if(Phone.matches (Cmccregex)) { -System.out.println ("Mobile phone number of China Mobile"); +}Else if(Phone.matches (Cncregex)) { -SYSTEM.OUT.PRINTLN ("China netcom 3G mobile phone Number"); +}Else { ASystem.out.println ("Unknown phone number")); at } -}