5 String
5 String
Stack Heap
Java String class
2. Using new keyword
🠶 We can create new String objects using the new keyword.
🠶 When we create new string literals using the new keyword, memory is allocated to
those String objects in the Java heap memory outside the String Pool.