首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

判断是不是为正确的移动号码

2013-03-25 
判断是否为正确的移动号码public static boolean isRightYDMobile(String str){ boolean msgfalse if(is

判断是否为正确的移动号码

判断是不是为正确的移动号码

public static boolean isRightYDMobile(String str)
{
 boolean msg=false;
 if(isNum(str) == true && str.length()==11)
 {
  String temp= str.substring(0,3);
  if(temp.equals("134") || temp.equals("135") || temp.equals("136") || temp.equals("137") ||
     temp.equals("138") || temp.equals("139"))
     {
   msg=true;

     }

 }
 return msg;
}

热点排行