• 2022-06-06
    下列代码执行结果是?( ) class HelloWorld { public static void modifyString(final String str) { str = "Hello World!"; } public static void main(String[] args) { String a = new String("Hello Java"); modifyString(a); System.out.println(“a = ” + a); } }
    A: a = Hello Java
    B: a = Hello World
    C: 代码编译错误
    D: 运行时异常