I am more of a visual learner. The simple visuals in this helps so much. I also learn better if I know WHY we are doing something. In other words, try to answer the question "what problem are we trying to solve?" This video also explains that. Most educators teach by saying "watch me code" and I find that frustrating. This is a superior source - thank you!
these are THE BEST TUTORIALS I have no idea why u can explain so simply and no teachers can, simple to the point with great real world examples... GREAT for refreshers
Because the different teachers want to show different ways of explaining things, as claiming their is the best-one and differ from the others. Moreover, as I know to get Academic title and rise up, you should have a certain amount of published works and other things. So many of them just compile old books and rewrite them in their on manner. And that's why there are good and bad books in a particular area of knowledge. For me, this is cheating but they dont care :)
I have spent almost half an hour searching about this. keyword without understanding it at all. But after watching that video I am confident that I got it! Thank you sir!
Great video, If anybody has issues with compiling the exact same file that is on the video you should check how public static void main(String[] args){} is written, since the author actually changed that to be correct on some moment of the video, but it's not obvious.
Doooood....that is awesome..i always had confusion about this keyword even after decent research but none was so satisfying as this...realy thanq so much..
***Correction***: public static void main(String[] args) / args can be written as argument too (you can actually write it as anything eg.: abcd, placeholder, putWhateverWordYouWant, declare)
I got like 11 errors when trying to compile the first time. As a beginner I had no idea how to correct it, but I just followed the errors saying "Expecting [" so, with trial and error I just removed "args" from the brackets and put it next to it.. Example: (String [ ] args) Complied and Boom! then as the video went on I saw his code had changed to remove "args" from those brackets. Still don't understand why or how it works that way, but i'm sure it will make sense soon.
If we have different variables for instance and local like a,b and c,d then even if we have different objects unless the set method is executed simultaneously it should work fine with out this keyword assuming it's not multithreaded I am asking after a long time posting this video if you see please reply
But shouldn't that already be inherent in making object? For example, if you make a class called Person with fields: name and age, each new instance is guaranteed to have their own variables for name and age. So if you do Person customer1 = new Person Person customer2 = new Person ... then customer1.setData("Kyle", 18); customer2.setData("Bob", 22); then each object has their own fields filled up. so if you do customer1.showData() it should show Kyle 18 whereas if you did customer2.showData() it should show Bob 22 That beginning, everything before the period, is the name of the object instance. Right? That indicates what data the showData method should be looking at. So if that's how objects work, I don't understand when and why we would use this.
+Charles Brown You're not nitpicking. It definitely changes... I got like 11 errors when trying to compile the first time. As a beginner I had no idea how to correct it, but I just followed the errors saying "Expecting [" so, with trial and error I just removed args from the brackets and put it next to it.. Complied and Boom! then as the video went on I saw his code had changed to remove "args" from those brackets. Still don't understand why or how it works that way, but i'm sure it will make sense soon.
I wish all tutorials came like this without an Indian accent. Nothing against Indians from India or accents but whenever you combine these two the English sounds comes out a little too seasoned by the rolled up tongue and highly expressed ( R's) and that causes a tiny unpleasent disruption in the ear drums.
OK, this one jumped a light year ahead and I am confused. What happened to Tutorials 11 and 12? You are introducing so many new concepts here that you have totally lost me.
You didn't add showData method and you didn't call it in the main method too. This is what you missed. class Account2{ int a; int b; public void setData(int c ,int d){ a = c; b = d; } public void showData(){ System.out.println("Value of A ="+a); System.out.println("Value of B ="+b); } public static void main(String args[]){ Account2 obj1 = new Account2(); obj1.setData(2,3); obj1.showData(); Account2 obj2 = new Account2(); obj2.setData(4,5); obj2.showData(); } } Output: Value of A =2 Value of B =3 Value of A =4 Value of B =5
Check out our FREE Real Time JAVA Project: www.guru99.com/live-java-project.html
I am more of a visual learner. The simple visuals in this helps so much. I also learn better if I know WHY we are doing something. In other words, try to answer the question "what problem are we trying to solve?" This video also explains that. Most educators teach by saying "watch me code" and I find that frustrating. This is a superior source - thank you!
Im someone like you
these are THE BEST TUTORIALS I have no idea why u can explain so simply and no teachers can, simple to the point with great real world examples... GREAT for refreshers
Because the different teachers want to show different ways of explaining things, as claiming their is the best-one and differ from the others. Moreover, as I know to get Academic title and rise up, you should have a certain amount of published works and other things. So many of them just compile old books and rewrite them in their on manner. And that's why there are good and bad books in a particular area of knowledge. For me, this is cheating but they dont care :)
honestly went through a lot of java not knowing what 'this' ment for a few months, thanks for explaining it to me
I have spent almost half an hour searching about this. keyword without understanding it at all. But after watching that video I am confident that I got it! Thank you sir!
Лучшее описание ключевого слова "this" во всей галактике :) Спасибо!
thank you sir, "this" tutorial is really awsm 😀😀👍👍👍
Great way to explain. I was struggling to understand this concept for very long time. Now clear as water.
why we just can not name differently from class variable name?
we can. but it's not cool
@@datageekz8446 we can and it is cool
same question 5 years later 😥
a very clear description ,thank you.
Wow a real life saver. Thanks
Great video, If anybody has issues with compiling the exact same file that is on the video you should check how public static void main(String[] args){} is written, since the author actually changed that to be correct on some moment of the video, but it's not obvious.
Best tutorial on this topic!
Thanks dude you're a lifesaver
Thanks dude! I finally understand the this Keyword after all these months! ♥
Superb explanation in shortest time!!
wow, very good, easy and helpful explanation, Thanks
Well done. THIS is a great video.
very easy to understand, thanks you very much.
Doooood....that is awesome..i always had confusion about this keyword even after decent research but none was so satisfying as this...realy thanq so much..
Now what are you doing?
You are crushing it dude! Nice video.
thank you! and also provide the user the option to view the video in full screen at your website
wth. this tutorial only makes me fully understand the this keyword. thanks to you,
that was a great explanation man
Thnx ..really useful
How did you achieve the handwriting effect in the video. Please share
Ahh, first impression is that you should probably be using tabs. Regardless, it is a great tutorial- thanks for making it!
this was damn confusing for me... this video really helped... thnku for uploading......
Superb!
Never capatalize tags in html... unless you're creating a new tag.. and even then, don't capatalize the letters in the tag.
You are so good thanks a lot.
Perfect 🔥
nyc i got it, really helpful.
Nicely explained
I love how condescending he is @3:25
I chuckled at that bit... lol
I didn't find that condescending - I thought it was humourous
@@johnbateman7415 It could be both you know. "Suppose you were smart enough..." sounds kind of condesending to most i would assume.
***Correction***: public static void main(String[] args) /
args can be written as argument too (you can actually write it as anything eg.: abcd, placeholder, putWhateverWordYouWant, declare)
Are you considering your parameter variables (int a, int b) local variables?
Yah they r local
Cool.. Nyc
I got like 11 errors when trying to compile the first time.
As a beginner I had no idea how to correct it, but I just followed the errors saying "Expecting [" so, with trial and error I just removed "args" from the brackets and put it next to it..
Example: (String [ ] args)
Complied and Boom! then as the video went on I saw his code had changed to remove "args" from those brackets.
Still don't understand why or how it works that way, but i'm sure it will make sense soon.
+Jonathan Nott its not important to understand this just yet, just know that this is the way it has to be in the main method.
really you an awesome guy
If we have different variables for instance and local like a,b and c,d then even if we have different objects unless the set method is executed simultaneously it should work fine with out this keyword assuming it's not multithreaded I am asking after a long time posting this video if you see please reply
but how about showData? do i need to specify the variable a with this.a ? i mean if i type a it will print local variable? just like setData? O.o
thankyou sir very helpfull
you are the best neggga
But shouldn't that already be inherent in making object?
For example, if you make a class called Person with fields: name and age, each new instance is guaranteed to have their own variables for name and age.
So if you do
Person customer1 = new Person
Person customer2 = new Person
...
then
customer1.setData("Kyle", 18);
customer2.setData("Bob", 22);
then each object has their own fields filled up.
so if you do
customer1.showData() it should show Kyle 18
whereas if you did
customer2.showData() it should show Bob 22
That beginning, everything before the period, is the name of the object instance. Right? That indicates what data the showData method should be looking at. So if that's how objects work, I don't understand when and why we would use this.
New Subscriber!
So this.var indicates it is the variable of the class and not the parameter?
thank you
use tabs please
Thank you :)
thanks
How can I get your all videos on java tutorials???
Now what are you doing?
Thanks.. 😁😁
Good.
good
why is there condition a=a , b=b in the method
thanks!
hello nice tutorials, can you post "android app dev"tutorials..using eclipse..
+Sandeep Varma
Why use Eclipse? Why not the Andriod Development Kit?
+Di Lung Move it Ya Fool! yea! I'm using Android studio Now..
tanx sir
THANKS!!!!!!!!!!!!!
aswm man.....
nicee
why this should be the first call in constructor? anyone?
And what about using "this" as an argument ??????
Maybe I'm nitpicking, but "public static void main(String[] args)" is changing form several times in the video.
+Charles Brown You're not nitpicking. It definitely changes... I got like 11 errors when trying to compile the first time.
As a beginner I had no idea how to correct it, but I just followed the errors saying "Expecting [" so, with trial and error I just removed args from the brackets and put it next to it..
Complied and Boom! then as the video went on I saw his code had changed to remove "args" from those brackets.
Still don't understand why or how it works that way, but i'm sure it will make sense soon.
this.comment=thanks_a_lot_man;
ten out of ten
. operator looks weird for it as this should be a pointer but hay, it's java
3:13
a WHOLE 1 hour lecture didn't get this across. Wth college.
so THIS keyword is for those of us who can’t come up with a suitable variable name
I wish all tutorials came like this without an Indian accent. Nothing against Indians from India or accents but whenever you combine these two the English sounds comes out a little too seasoned by the rolled up tongue and highly expressed ( R's) and that causes a tiny unpleasent disruption in the ear drums.
this syntax makes me want to rail my head through this brick wall
Very useful, but please stop using 'append' when you mean 'prepend' 8¬]
OK, this one jumped a light year ahead and I am confused. What happened to Tutorials 11 and 12? You are introducing so many new concepts here that you have totally lost me.
I love you
rip windows xp
Great simple video but... HOW WILL YOU PRINT THE OUTPUT?? There is no showData method.
>>> Output is blank
You didn't add showData method and you didn't call it in the main method too.
This is what you missed.
class Account2{
int a;
int b;
public void setData(int c ,int d){
a = c;
b = d;
}
public void showData(){
System.out.println("Value of A ="+a);
System.out.println("Value of B ="+b);
}
public static void main(String args[]){
Account2 obj1 = new Account2();
obj1.setData(2,3);
obj1.showData();
Account2 obj2 = new Account2();
obj2.setData(4,5);
obj2.showData();
}
}
Output:
Value of A =2
Value of B =3
Value of A =4
Value of B =5
use an IDE, damn
Thanks
thank you
thanks