单项选择题

若有定义Stringtom="Iamagoodcat";则tom.indexOf("a")的值为()

A.2
B.3
C.4
D.5