1. 程式人生 > >JAVA擷取後String字串六位字元

JAVA擷取後String字串六位字元

 public static void main(String[] args){
        String cellphone="15585458544";
        String pwd = cellphone.substring(cellphone.length() - 6);
        System.out.println(pwd);
    }

str.substring