电话号码以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