Subscribe

Powered By

Free XML Skins for Blogger

Powered by Blogger

Sabtu, 25 Oktober 2008

Advantage And Disadvantages Of String Implementation In Java

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

Tidak ada komentar: