找到正确的输出:( )
StringBuffer fb = new StringBuffer("one two one");
int i, j;
i = fb.indexOf("one");
System.out.print(i + ",");
j = fb.lastIndexOf("one");
System.out.println(j);1,9
0,8
0,2
1,3
indexOf()在字符串中检索第一次出现目标字符串的序号。
lastIndexOf()在字符串末尾向前检索第一次出现目标字符串的序号。
lastIndexOf()在字符串末尾向前检索第一次出现目标字符串的序号。