單項選擇題

Java語言中,Stringstr=”123456789”,System.out.println(str.indexOf(“5”)),輸出結果為()。

A.6
B.5
C.4
D.-1

微信掃碼免費搜題