Java基础---String
1). 字符串String 转换成 int
int i = Integer.parseInt("str");
2). indexOf()方法
*1. int indexOf(String str)
返回指定字符串在此字符串中第一次出现处的索引
例:
1 //字符串str索引从0开始
2 String str = "/VIID/System/Log";
3 int index = str.indexOf("/System");
4 //index值为5
5 /对应字符串str的索引是0,V对应索引是1,第一个I对应索引是2,第二个I对应索引是3,则/System首次出现时字符串索引是5