使用字符串切割,使手机号中间四位隐藏
生活随笔
收集整理的這篇文章主要介紹了
使用字符串切割,使手机号中间四位隐藏
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
/*** 使用字符串切割,使手機號中間四位隱藏*/
public class Demo5 {public static void main(String[] args) {//隨便模擬一個手機號String str = "18857552632";//切割前三位String s1 = str.substring(0, 3);//切割后四位String s2 = str.substring(7);System.out.println(s1 + "****" + s2);}
}
總結
以上是生活随笔為你收集整理的使用字符串切割,使手机号中间四位隐藏的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Rundll32.exe是什么?Rund
- 下一篇: Services.exe是什么系统文件?