String还定义有lastIndexOf(String str,int from) 意思为str在字符串多次出现时将返回最后一次出现的位置。
eg: String str = "I can because i think i can";
int index = str.lastIndexOf("can")
System.out.println(index); // 24
String还定义有lastIndexOf(String str,int from) 意思为str在字符串多次出现时将返回最后一次出现的位置。
eg: String str = "I can because i think i can";
int index = str.lastIndexOf("can")
System.out.println(index); // 24
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。