电话号码以185****3547显示demo

     String phone="18678473547";
	//String phones = phone.substring(0,phone.length()-(phone.substring(3)).length())+"****"+phone.substring(7);
      String phones = phone.substring(0,3)+"****"+phone.substring(7); System.out.println(phones);//结果:185****3547

  

posted @ 2017-06-13 11:21  ATJAVA  阅读(251)  评论(0编辑  收藏  举报