Difference in string initialization between new String("X") and new String("X") + new String("Y") in Java – stackoverflow.com

public static void main(String[] args) { String s1 = new String("aa"); s1.intern(); String s2 = "aa"; System.out.println(s1 == s2); String str1 = new String("str") + new ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

0 Comment to "Difference in string initialization between new String("X") and new String("X") + new String("Y") in Java – stackoverflow.com"