If I have a string.

String msg = "I love mickey mouse";

What method can I used to display the string, "mickey"?

I will use indexOf(). Is it correct?

Try to read documentation for the method public String substring(int beginIndex, int endIndex)

我会用 String[] split(String regex) 得到一个关于这个字符串的字符串数组

public String getStringMickey(){
       String msg = "I love mickey mouse"; 
       String[] str = msg.split(" ");
       return str[2];
}

我会用 String[] split(String regex) 得到一个关于这个字符串的字符串数组

public String getStringMickey(){
       String msg = "I love mickey mouse"; 
       String[] str = msg.split(" ");
       return str[2];
}

Why str[2]?

Read the API doc for the split() method.
Where (what index) in the array returned by split() would the desired word be?

不知道楼上的意思是什么,回答引用人的问题:
String str[] = msg.split(" ");
这里的str是一个String数组,里面装的是{"I","love","mickey","mouse"}
now, do u know why str[2] 了吗?

Use subString() method...
See the documentation for method signature...