题目内容

下列关于字符串描述,错误的是?

A. 字符串具有不可变性
B. 字符串可以用只读字符数组的方式来访问
C. String对象可以通过Length属性来获取字符串长度
D. 对String对象进行修改时,不会生成新的字符串对象

查看答案
更多问题

执行String.Compare(“abc”,”aaa”)返回的结果是?

A. 0
B. -1
C. 1
D. fase

假如IndexOf()方法未能找到所指定的子字符串,则返回以下选项中的哪个?A、-1 B、0 C、false D、null

A. -1
B. 0
C. fase
D. null

string s = "abcdedcba";则s.Substring(3,2)返回的字符串是以下选项中的哪个?

A. cd
B. de
C. d
D. e

执行String.Join(“-”, new string[] { "ab","cd","ef"})返回的结果是?

A. abcdef
B. ab-cd-ef
C. -ab-cd-ef-
D. a-b-c-d-e-f

答案查题题库