Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试将两个字符串与.equals()method 以及 equals进行比较sign(==)。但有时,他们俩都会给出相同的答案。我该如何解决这个问题?
.equals()
sign(==)
关于实习字符串,基本上有两件事需要了解:
intern()
不过,有几个更好的点:
"foo"+"bar"
"foobar"