單項選擇題

設(shè)有定義:Strings=“World”;下列語句錯誤的是()

A.intm=s.indexOf(‘r’);
B.charc=s.charAt(0);
C.intn=s.length();
D.Stringstr=s.append(‘2’);

微信掃碼免費搜題