Java中String的substring方法

substring(int begIndex ,endIndex)

beginIndex是指起始位置,endIndex是指结束位置。

例如 String cardNo =  "2210610161990354";

  String  subCardNo =cardNo.substring(4,6);

结果subCardNo  61;

原文地址:https://www.cnblogs.com/apollo-shen/p/8757566.html