#string

Published: 04 February 2022
on channel: SJ Programming Solutions
1,320
27

#stringconstantpool #sjprogrammingsolutions #interviewquestionsonstringinjava

What is string constant pool and heap in Java?
What is the advantage of string constant pool in Java?
Where is the string pool in Java?
Is string constant pool part of heap?
Does new String create object in String pool?

Hi All,
In todays video we are going to disscuss about the String Object creation behind the scene. What will happen when we create the string using new keyword and using litterals . How many Objects will get created and where exactlt in memory those objects will strored.

String str1=new String("hello");

in this case 2 objects will create one inside String Constant Pool and one inside Heap memory area.

String str1="hello";

in this case only one object will crate inside String constant pool.

Thank you for watching !

How the string object created behind the scene?
What is String constant Pool?
String Interview Questions and answers
String Constant Pool Working in java


On this page of the site you can watch the video online #string with a duration of hours minute second in good quality, which was uploaded by the user SJ Programming Solutions 04 February 2022, share the link with friends and acquaintances, this video has already been watched 1,320 times on youtube and it was liked by 27 viewers. Enjoy your viewing!