filmov
tv
String In Java / String Class in Java / String Literal Pool in java / String Constant Pool in java

Показать описание
#string #java #StringPool #StringLiteralPool #StringInJava
String is reference type, not a primitive type
String class is final class.
We can create object of string in two types.
String s1 = new String(“Hello”); //managed heap
String s2 = “Hello”; //String pool
String is reference type, not a primitive type
String class is final class.
We can create object of string in two types.
String s1 = new String(“Hello”); //managed heap
String s2 = “Hello”; //String pool