string的indexof用法 java中的lastIndexOf( )函数是什么意思?

java中的lastIndexOf( )函数是什么意思?Int x=a.lastindexof(b),表示b字符串在字符串中的最后位置。如果a=“abcd”B=“d”,则X的值为7

java中的lastIndexOf( )函数是什么意思?

Int x=a.lastindexof(b),表示b字符串在字符串中的最后位置。如果a=“abcd”B=“d”,则X的值为7