截取手机号,部分字段显示为****

out.print(new StringBuffer(rs.getString("mobile")).replace(3,7,"****"));


String m=rs.getString("mobile");
out.print(m.substring(0,3)+"****"+m.substring(7,11)+":");



oracle语句实现
select replace(mobile,substr(mobile,4,4),'****') from ins

你可能感兴趣的:(java,mobile)