Browsed by
Tag: core java

String in Java – String Literal, String Pool, String Objects

String in Java – String Literal, String Pool, String Objects

         String is a special non primitive data type in java if we compare with any others. But why! In String, we are having string pool as well as heap memory to store the values. The strings are immutable by nature. String is an object which contains sequence of character’s. String is not belong to primitive data type whereas we can create object using java.lang.String. There are two ways to create the string in Java.    …

Read More Read More