若有定义Stringtom="Iamagoodcat";则tom.indexOf("a")的值为()
A:2
B:3
C:4
D:5
出自:计算机科学