范冰冰亲吻李晨:java问题

来源:百度文库 编辑:高考问答 时间:2024/05/05 07:21:47
str2 = "One Two Three One";
idx = str2.indexOf("One");
System.out.println("Index of first occurrence of One: " + idx);
idx = str2.lastIndexOf("One");
System.out.println("Index of last occurrence of One: " + idx);

str2.indexOf("One");
str2.lastIndexOf("One");
这二句是什么意思,为什么输出结果是0和14,请帮我每 行解释一下