Advantages of the String implementation in JAVA
1. Compilation creates unique strings. At compile time, strings are resolved as far as possible. This includes applying the concatenation operator and converting other literals to strings. So hi7 and (hi+7) both get resolved at compile time to the same string, and are identical objects in the class string pool. Compilers differ in their ability to achieve this resolution. You can always check your compiler (e.g., by decompiling some statements involving concatenation) and change it if needed.
Read more
Langganan:
Posting Komentar (Atom)



Tidak ada komentar:
Posting Komentar