About "equal" in String and StringBuilder

The equals method is rewritten in String, and the same content will return true if the address is different

There is no rewriting in StringBuilder, as long as the addresses of the two strings are different, false will be returned even if the content is the same

Reference https://www.cnblogs.com/zhchoutai/p/8278889.html

Guess you like

Origin blog.csdn.net/mugeit/article/details/114337276