00:02 Understanding the 'this' keyword in Java 01:14 In Java, the stack memory and heap memory are used for different purposes. 02:27 Local and instance variables with the same name in Java 03:43 Assigning a variable to itself in Java can lead to unexpected behavior. 04:55 In Java, 'this' refers to the current object instance. 06:04 Creating a new object may cause issues with assigning values. 07:19 Passing object references and differentiating between instance and local variables in Java 08:36 The 'this' keyword represents the current object in Java
I was learning java for project requirement and this video saved my life to understand this in java it is weird but understood :) No one can escape this three languages in their life java, python and js
Iam here from JS and i know the function of this keyword but when i was a beginner it was a huge headache for me. But after this video I can clearly state that Navin reddy sir aka telusko is one of the best teacher ever. Genius, the way he explained about this keyword..
I watched many videos to understand how this keyword works, but none of them helped me. This video cleared all my doubts and questions. Thank you, sir, for this lecture!
Like me a person love details and how things works. I watched alot of tutorials about java and difficult topics like consturtor and this keyword,implicitly I understand it but I can't move without understanding initial way for things work. Your explaining with more fantastic details and different way, you are amazing . Thank you alot my teacher
THIS is the only time I have ever understood the THIS keyword. Thank you so much!! So does that mean that the This keyword is only used in NON-STATIC methods?
Can we say that constructor return this that is why we can use to access instance variable Like Human obj = new Human(); //Human(); It is constructor call
I think you are asking it for this keyword am I correct? if that is your question, Then whenever you create an object it cannot use the variable directly so we need to use methods to access it, when you create an object to modify those values using methods those object are the current object for the "this" keyword (this is not a correct answer this is what i understand so far)
No, I sometimes didn't get what he meant, :D I understood about this keyword, I know It refer to the current class object, we use in many ways, for builder pattern and for constructor to set the values so we define it and distigawise between local and global var, I don't care much much he don't explain the internal thing, so for refresh it is fine but not for the real knowledge. @@karots77
Can anyone one help me to understand ? I didn't understand at this "when we call age function we are passing the value ?👀 But why the heck we did we get zero, what's happening if we mention local and instance variable as same name ?
bro used entire 9 minutes just to define a single keyword , this shows he wants us to learn deeply 🙇🔥
while learning java i had realised that java is easier than java script bcoz in java script to explain the this keyword it will take easily an hour.
@@sai_teja_ig java and javascript are completely different so why compare?
00:02 Understanding the 'this' keyword in Java
01:14 In Java, the stack memory and heap memory are used for different purposes.
02:27 Local and instance variables with the same name in Java
03:43 Assigning a variable to itself in Java can lead to unexpected behavior.
04:55 In Java, 'this' refers to the current object instance.
06:04 Creating a new object may cause issues with assigning values.
07:19 Passing object references and differentiating between instance and local variables in Java
08:36 The 'this' keyword represents the current object in Java
thanks brother ...
I was learning java for project requirement and this video saved my life to understand this in java it is weird but understood :) No one can escape this three languages in their life java, python and js
Excellent way of teaching.
Pushes us to wrong path only to make us understand the right path. Thank you.
Iam here from JS and i know the function of this keyword but when i was a beginner it was a huge headache for me. But after this video I can clearly state that Navin reddy sir aka telusko is one of the best teacher ever. Genius, the way he explained about this keyword..
Amazing Explanation sir. Trying out different possibilities and explaining really nice
I watched many videos to understand how this keyword works, but none of them helped me. This video cleared all my doubts and questions. Thank you, sir, for this lecture!
The best Java teacher I have ever seen. Explanations, Examples are perfect
Best explanation ever!
I can't thank you enough for these amazing tutorials sir.
Like me a person love details and how things works. I watched alot of tutorials about java and difficult topics like consturtor and this keyword,implicitly I understand it but I can't move without understanding initial way for things work. Your explaining with more fantastic details and different way, you are amazing . Thank you alot my teacher
Your way of explaining things is fantastic. Thank you.
This video shows your passion towards teaching, great work sir, I'm impressed 👏🏼
Thanks a ton sir, now the confusion got cleared for me for THIS keyword…. Your explanation is irreplaceable…🥰🥰🥰🥰🥰
superb, i will never ever forget this keyword again, Thank you
THIS is the only time I have ever understood the THIS keyword. Thank you so much!! So does that mean that the This keyword is only used in NON-STATIC methods?
bro why do you look so humble ❤️ thanks for the videos anna..!!
Thankyou sir ❤ keep teaching us like this. More respect to you sir.
best explanation
quality content fr🙂
public void setAge(int age, Human obj)
{
obj.age = age;
}
also works instead of creation a new object
He said that too, you missed it ig
Wow great concept Thanks you so much❤
brilliant explanation
Can we say that constructor return this that is why we can use to access instance variable
Like
Human obj = new Human();
//Human(); It is constructor call
Perfectly explained. Thank you.
Hey Navin sir! Your fan from Nepal!
Great way of explanation
I really helped me in understanding this, thanks ❤
Grateful for this Playlist ...thank you!
hi Navin , pls make a video on passing this keyword into methd arguements and passing this keyword as arguments in parameterised constructors
Excellent explanation ,thanks😊
This is very good explanation 👍
Thank You. Nice explanation diagrammatically.
Thanks for the explaination Sir.
I literally clapped when this was used at last
Happy teacher's day sir🎉🎉🎉
you are excellent at java concepts
finally understood the true meaning of "this"
Salute you sir 🔥💯
Why should we use this keyword in first statement of the method always? what happens if we not?
Thanks Naveen 🔥 Big fan 💥
Java means Telusko ❤
Instead of setage or setname why can't we set it with a constructor and then use a method to return the value ?
Amazing.
one doubt, if we are not using this key word and just using two different variable names..will it work?
yeah it will work
beautifully explained by going wrong ways.. no one can ever forget this
Learning by mistakes is the best way 😉
What do you mean by the current object !?
I think you are asking it for this keyword am I correct? if that is your question, Then whenever you create an object it cannot use the variable directly so we need to use methods to access it, when you create an object to modify those values using methods those object are the current object for the "this" keyword (this is not a correct answer this is what i understand so far)
No, I sometimes didn't get what he meant, :D I understood about this keyword, I know It refer to the current class object, we use in many ways, for builder pattern and for constructor to set the values so we define it and distigawise between local and global var, I don't care much much he don't explain the internal thing, so for refresh it is fine but not for the real knowledge. @@karots77
Can anyone one help me to understand ?
I didn't understand at this "when we call age function we are passing the value ?👀 But why the heck we did we get zero, what's happening if we mention local and instance variable as same name ?
great teacher love you
Super sir
Lil bit confusion sir.
line 30
obj.setAge(age: 30); // how did he type this inside the bracket--> age:
Inlay hints added by vs code (not a part of the code)
Not written by me.
@@Telusko oh, I'm learning java using Eclipse which is why I was unaware..thanks bro..
varayyo vammo...entha baga cheppav babai.
we cant call local variable outside of its local context
That's a lot of THIS😂
Take simple example
🙏❣
why to use same name for variables use different and all problems solved
thank god kadavul one ha padachan da 4 lakhs wasted on college
sir khud he kyu padh rahe ho