String object creation behind the scenes || string constant pool || java.lang.String

  Рет қаралды 29,048

Selenium Express

Selenium Express

Күн бұрын

Пікірлер: 37
@hemantvc
@hemantvc 2 жыл бұрын
Cool. Easy to learn java string and string constant pool
@aricaacharya5976
@aricaacharya5976 3 жыл бұрын
Best exaplaintion after watching 10 different videos. Great job man 👏
@giridatta1525
@giridatta1525 3 жыл бұрын
Great teaching, concept is very clear,keep doing more
@vineetjain7518
@vineetjain7518 2 жыл бұрын
Great
@abdulshaik2106
@abdulshaik2106 5 жыл бұрын
Awesome.. Great teaching Sir 👏👏👏we understand the concept in ur teaching so soon..
@michaelhall4602
@michaelhall4602 19 күн бұрын
This is late, but really good job explaining this.
@vladanulardzic5859
@vladanulardzic5859 5 жыл бұрын
Perfect practical explanation ! Keep on ...
@pujabansal810
@pujabansal810 5 жыл бұрын
Avilash you are great teachers. I am watching all of your video's. The way you explain things direct goes into brain.
@nainatiwari84
@nainatiwari84 4 жыл бұрын
Nice explanation bhaiya.you are doing a great job.your english is mind blowing.keep it up.
@rishitamathur5808
@rishitamathur5808 6 жыл бұрын
thanks for making me understand so precisely😊
@vijayr6540
@vijayr6540 5 жыл бұрын
Super , Thankyou
@munaswamy6595
@munaswamy6595 5 жыл бұрын
Super experience
@AlfonsoMonroyIV
@AlfonsoMonroyIV 5 жыл бұрын
thanks man, and what happends when you make a System.out.println("var"); where is the "var" created? and what happen when I.E. String c="var"; System.out.println("var"==c); why does it return false?
@prakharprasant7766
@prakharprasant7766 5 жыл бұрын
true it will return
@hariindia2265
@hariindia2265 5 жыл бұрын
bro can u please do vedeos on java8 features full tutorial mainly java8 streams
@asthagarg4614
@asthagarg4614 4 жыл бұрын
In case of String s= new String ("java")- since object is Stored in heap as well, then what role does java in String constant pool play?
@abhiny8
@abhiny8 4 жыл бұрын
Scp is used to improve performance suppose we already have a string object with same content then it'll retrieve from scp quickly that's why creating strings with literals i.e String str="hello"; is preferred
@subbu5b0
@subbu5b0 6 жыл бұрын
How can you prove that 2 objects will get created (in heap & in Scotland) when we create a String object using new?
@amitgaikwad3120
@amitgaikwad3120 4 жыл бұрын
-- You need to use intern() of String class. -- using intern() method with String object created using "new" keyword, will return the reference of the exact String object created in SCP area. public class TwoObjectsCreatedProof { public static void main(String[] args) { String s1= new String("Hello"); // 2 objects are created "Heap' and "SCP" area. String s2=s1.intern(); // returns the reference from the SCP area and assigns it to 's2'. System.out.println(s2); // prints "Hello" from SCP area System.out.println(s1==s2); // false } }
@akhil2228
@akhil2228 5 жыл бұрын
super
@annusunny
@annusunny 5 жыл бұрын
@ 17:19 | S1 and S2 are not objects but just data types, Although good explanation.
@thannasip8001
@thannasip8001 5 жыл бұрын
not data type it reference variable right?
@sangram1746
@sangram1746 7 жыл бұрын
Nice
@ashishbarik9936
@ashishbarik9936 7 жыл бұрын
Thank you abhilash I got the concept clear
@JohnWick-zc5li
@JohnWick-zc5li 6 жыл бұрын
if the String pool becomes full -- how JVM will delete or flash the strings from Constant Pooling
@SaiSVolgs
@SaiSVolgs 6 жыл бұрын
can you please explain what is differ b/w final and immutable
@swagatkumarsahu5857
@swagatkumarsahu5857 3 жыл бұрын
When any string will be created with new key word like - new String("Java"), then the object will be created in Heap memory not in String Constant Pool.
@nareshbarik9634
@nareshbarik9634 5 жыл бұрын
if i go for s1.equals(s2) in IF statement then it will gives the output of if statement..how..this possible..?
@shubhangijore2586
@shubhangijore2586 5 жыл бұрын
Because equals method compare content in string class
@bipinesh08
@bipinesh08 6 жыл бұрын
How does the Intern method works if creating a string using new creates two objects one in the heap and one in scp. Isn't the whole purpose of intern is to create a copy in scp
@nar2205
@nar2205 5 жыл бұрын
String s=new String("java"); here, "java" will not go into string constant pool unless we say intern
@smyThegmc
@smyThegmc 4 жыл бұрын
sen harikasın
@saktiranjanbehera7010
@saktiranjanbehera7010 5 жыл бұрын
where is the scp area located in jvm ?
@ramkumar-id9hu
@ramkumar-id9hu Жыл бұрын
Heap
@parikshit3312
@parikshit3312 6 жыл бұрын
please remove the background music its irritating and distracting
@SeleniumExpress
@SeleniumExpress 6 жыл бұрын
Sure.. Will keep that in mind. Thanks for letting me know Parikshit.
DIFFERENT ways to create an OBJECT in JAVA [IMPORTANT] || Part 1 ||
8:09
Lamborghini vs Smoke 😱
00:38
Topper Guild
Рет қаралды 57 МЛН
How Many Balloons To Make A Store Fly?
00:22
MrBeast
Рет қаралды 173 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 106 МЛН
Why string is immutable in java || The 4 reasons you must know || part 1
20:53
String Memory Allocation in Java (Stack Memory Vs Heap Memory Vs String Constant Pool)
9:55
Code-Travel-Explore-With-Harshal
Рет қаралды 19 М.
Object-Oriented Programming is Bad
44:35
Brian Will
Рет қаралды 2,3 МЛН
Lamborghini vs Smoke 😱
00:38
Topper Guild
Рет қаралды 57 МЛН