• 2022-06-19
    已知Strings="hello";则关于表达式语句s.append("java");的说法正确的是?
    A: 编译通过,顺利运行,则执行该表达式之后,s的字符串是“hellojava"
    B: 编译通过,顺利运行,则执行表达式之后,s的字符串是“hello"
    C: 编译失败,因为String对象s是字符串常量,无法添加新的字符串
    D: 编译失败,因为String对象"hello"是字符串常量,没有append方法