使用String对象的indexOf()方法查找字符串”helloworld”中是否包含G,下列语句描述正确的是()。
- A、字符串"helloworld"中不包含G字符,indexOf返回0
- B、字符串"helloworld"中不包含G字符,indexOf返回null
- C、字符串"helloworld"中不包含G字符,indexOf返回-1
- D、字符串"helloworld"中不包含G字符,indexOf返回1
正确答案:C
答案解析:有

微信扫一扫手机做题
使用String对象的indexOf()方法查找字符串”helloworld”中是否包含G,下列语句描述正确的是()。
微信扫一扫手机做题