单选题 顺序执行下列程序语句后,则b的值是( )。 String a = "Hello"; String b = a.substring(0,2);
【正确答案】 C
【答案解析】substring( )方法是用来提取子字符串的,此题是提取字符串a的第 0个到第2个字符组成新的字符串:Hel。