Skip to content

第八章114页字符串常量池 Java17 #206

Open

Description

@zbncs

String s3 = new String("1") + new String("1");
s3.intern();
String s4 = "11";
System.out.println(s3);
System.out.println(s4);
System.out.println(s3 == s4); // false

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions