I was trying to learn Java through the Oracle tutorials, and was stuck on this subject for over a week. In fact I stopped for a while, and am going back to it now. You made it all very clear to me. Thanks a lot.
Im a software engineer and to be honest, have dealt with an onslaught of having to learn more than a few languages. Sometimes I get rusty and I love going back to your videos to get a great refresher on things that are clear but need to be crystal. Great explainations!
There are so many things that are almost (but not quite) the same in Java and C# in particular that jumping back and forth is rather disorienting. At least I'm not dropping ;'s and { } 's like when I go into Python mode for a few days and come back....
I really appreciate you taking the time to make these excellent tutorials, in my opinion they are the best tutorials on RUclips and deserve many more views than the thenewboston. Keep up the goodwork!
Hi John thanks a lot for wonderful lessons , I haven't done programming before,Java is my first programming I can understand each and every video lesson.Your are my tutor, everyday I am learning from your cave of programming ...The way explain awesome.I have become your fan :) ...
- Found Your Swing (GUI) Course on Udemy... - just signed up for it - ! - Thanks again for the resource - ! - I'd encourage You to make a C++ Course(s)... - as I read on Cave Of Programming that You are experienced in that language also - & I'm certain that it would help me as I begin to learn C++ (& C) throughout University - D.
I second this, I think we all should encourage John to create c++ tutorials, well that is if he has the time for it :) C++ can be used for many things in which Java cannot do such as creating game/rendering engines, real time embedded systems etc. Thanks for the tutorials though, makes programming more enjoyable.
omg.. you totally explained that for me... i was going through some oracle java docs, and it was confusing... that is when i found this tutorial with a "master piece theater" opening... :)
I forgot I'd watched this one video, it must have been where I saved this playlist, expecting to come back to it if I actually started using Java as my main language at some point. Very cool. Most of the first 31 were review for me, altho I'd been writing so much C# that C# was coming out of my fingertips when I meant to write Java lately. This one is cool and something that casual Java users could easily forget/get confused when they see or need to use. Great video.
Thanks! I have a whole massive tutorial on GUI programming in Java, but only the first few videos are free. You can find all my stuff on my website (which I revamped recently so it's no longer an eyesore) ... search for Cave of Programming.
Well done and thank you! I understood the concept. But, I think it would be better if you could add more methods in Machine class and show that the object machine1 could access those methods as well. Only then, you will be showing "clearly" that overriding takes place.
Anonymous classes seems a bit confusing to learn, it almost feels like I'm creating a class and implementing an interface but I'm doing it backwards with the class name unknown. Do you think I can move on with the tutorials before understanding this to a fully 100% and that I eventually will get this, or should I try to search around a little on the web for further information about anonymous classes?
+TimpisHouse You can move on, sure. I mainly use anonymous classes only when responding to Swing button clicks, and then you get used to just doing the procedure for creating some onclick code and not worrying about it. When you can add some code to a button, or start a thread using an anonymous class, you've basically grasped all you really need to know about it. You can even just never use them at all if you don't like them.
+John Purcell Thanks a lot for the good and fast response. Also i notcied that you had an android icon on your desktop, do you have an android and/or a "callback/alerting" tutorial as well?
+TimpisHouse Sorry I missed this. I do have an android course, it's free on my site, but a bit old (uses Eclipse instead of Android Studio). I don't think I cover callback/alerting though -- not sure what it is. I cover onclick-type stuff of course, if you mean this stuff.
Thanks for this John (as ever). May I make a suggestion (I've thought it for the last few videos in this course on more difficult topics, but have been prompted by your closing remark about GUI programming); I appreciate it's too late for this course. You explain things really clearly, but beginners may struggle to understand why it's necessary to have these techniques. A good example is lambda expressions (in Java 8): explaining them might make sense but the beginner may struggle with why are they necessary / where to use them / what problem they solve. It may help understanding to add some brief observations about how the technique might be deployed in the real world / why it exists. Thanks again.
Thanks Alphonso, you're not the first to say it. If I remake the course one day, I'll add more exercises at least. With lambda expressions it's particularly tricky to give examples, because I can't think of many examples that would really make sense to a beginner. Perhaps I could have illustrated using the Timer class. But then there's still not much you can usefully do with a Timer unless you know some Swing or something.
you exactly told what i want to hear and for which i was about to hit my head on wall . That how SetOnClickListener and ClickListener is working what the hell wrong with my udnerstanding on this code and after looking at your example i will look again the code and will surely make the sense after learning from your tutorial...thanks a bunch ....!! great tutorials i must accept...!!
Thanks for our comments?! No...Thank YOU for these tutorials! I can't wait to complete this beginners course so I can move on to some of your other courses at caveofprogramming. You are giving hope to my dreams of making a career change. Thanks!
- Great Series of Tutorials... - Thank You - ! - Did You make the follow-up video that further demonstrates this concept / technique when used in conjunction with GUI programming - (?) D.
Hi John!! I just want to say thank you again for all your free videos and have a marry Christmas!! *** also i dont really understand the concept of the anonymus classes, for what reason we use them, and the methods declared in anonymus classes are the onese being displayed when the methods are overwritten from other classes. Why is that so? I am still stuck on this level even tho i started watching Swing tutorial aswell.. I have watched these beginners tutorials two times and there are some things i still dont understand or i understand but cant really remember how to use it, is that normal? I have way too many questions but i know you dont have time answering them all, so once again Marry Christmas.Ah yeah and you should try duck breast and red cabbage, thats a traditional hungarian dish for Christmas! Cheers
This is one of those topics that separates the C/C++ programmers who know a bit of Java, or dabblers, from people who really know how to use Java. It still looks weird and tripped out to me as a mostly C/C++ programmer but I'll watch this video until it seems like the most natural thing in the world, because as you point out, you want to focus on what the programmer is trying to accomplish in places where they use anonymous classes, not put off by and looking funny at this construct.
Please explain how you run program containing multiple classes within single *.java file. I understand that this is for learning purposes, but sometimes I want "to see whole picture" in one sight to elaborate something. Thanks n advance.
+xXxBladeStormxXx Yes, sort of. This is the way you had to do it before lambdas came along. Now if your interface only has one method, you can use a lambda expression instead.
***** Thanks for the prompt reply. I also want to express my deep gratitude for these free videos. I already know other programming languages and I wanted something that taught me Java style and syntax quickly, and that is exactly what this series has done. Thank you for this.
+Mohamed Sabri Ben Chaabane Exquisite, also very exquisite! *Walks off a cliff after admiring a row of paintings.* Not so exquisite. Ahhhhhhhhhhhhhhhhhhh!!!!
dude you explained this more clearly than anyone else I've seen. great video thanks
I was trying to learn Java through the Oracle tutorials, and was stuck on this subject for over a week. In fact I stopped for a while, and am going back to it now. You made it all very clear to me. Thanks a lot.
Cheers! I don't rehearse but I do often record a video multiple times till it's right.
this tutorial was soooooo clear and well explained compared to every other source I tried learning about anonymous classes from. love your work!
Been working on event listeners/handlers in Android and all the stuff about working with anonymous classes confused me until I watched this. Thanks!
Im a software engineer and to be honest, have dealt with an onslaught of having to learn more than a few languages. Sometimes I get rusty and I love going back to your videos to get a great refresher on things that are clear but need to be crystal. Great explainations!
There are so many things that are almost (but not quite) the same in Java and C# in particular that jumping back and forth is rather disorienting. At least I'm not dropping ;'s and { } 's like when I go into Python mode for a few days and come back....
Thank you sir.
Usually, I don't leave comments. But this great tutorial made me do it.
I study computer science and your videos are very helpful and very clear to understand , thank you very much !
I really appreciate you taking the time to make these excellent tutorials, in my opinion they are the best tutorials on RUclips and deserve many more views than the thenewboston.
Keep up the goodwork!
Clear voice, good quality, logically explanations !! Thank you !!! You really helped me to understand the consept of anonymous classes !!
Hi John thanks a lot for wonderful lessons , I haven't done programming before,Java is my first programming I can understand each and every video lesson.Your are my tutor, everyday I am learning from your cave of programming ...The way explain awesome.I have become your fan :) ...
I have watched all of your previous tutorials. You are amazing dude!
package main;
public class John {
public static void main(String[] args) {
System.out.println("Thanks! This Tutorials are epic!");
}
}
Lol
for (int i = 0; i < 100; i++){
System.out.println("Thanks! This Tutorials are epic!");
}
Let's take it one step further:
while(true)
System.out.println("Great videos! Best tutorials on teh Interwebz!");
- Found Your Swing (GUI) Course on Udemy... - just signed up for it - !
- Thanks again for the resource - !
- I'd encourage You to make a C++ Course(s)... - as I read on Cave Of Programming that You are experienced in that language also - & I'm certain that it would help me as I begin to learn C++ (& C) throughout University -
D.
I second this, I think we all should encourage John to create c++ tutorials, well that is if he has the time for it :) C++ can be used for many things in which Java cannot do such as creating game/rendering engines, real time embedded systems etc. Thanks for the tutorials though, makes programming more enjoyable.
omg.. you totally explained that for me... i was going through some oracle java docs, and it was confusing... that is when i found this tutorial with a "master piece theater" opening... :)
I forgot I'd watched this one video, it must have been where I saved this playlist, expecting to come back to it if I actually started using Java as my main language at some point. Very cool. Most of the first 31 were review for me, altho I'd been writing so much C# that C# was coming out of my fingertips when I meant to write Java lately. This one is cool and something that casual Java users could easily forget/get confused when they see or need to use. Great video.
you just showed how to explain a theme without making it more confusing as others do in their videos. great explaination
Thanks! I have a whole massive tutorial on GUI programming in Java, but only the first few videos are free. You can find all my stuff on my website (which I revamped recently so it's no longer an eyesore) ... search for Cave of Programming.
Very cool! Great for quickly writing something up to test an idea.
Love how clear and concise your explanation is.
U ve taught it so well, way better than any other java tutorial I saw in google
I commend you on your engaging lectures. Thank you so very much for your service in helping others understand these concepts!
Very powerful concepts. Thank you for the tutorial.
Interesting topic, I had never heard of this before. It feels a little bit like the readability gets a bit worse when using anonymous classes...
Well done and thank you! I understood the concept. But, I think it would be better if you could add more methods in Machine class and show that the object machine1 could access those methods as well. Only then, you will be showing "clearly" that overriding takes place.
I like the Beethoven 4th piano concerto in the background
Many thanks for great effort, please upload successors tututorial as well. Loved it ☺️
you made it so easy thank you very much
Anonymous classes seems a bit confusing to learn, it almost feels like I'm creating a class and implementing an interface but I'm doing it backwards with the class name unknown. Do you think I can move on with the tutorials before understanding this to a fully 100% and that I eventually will get this, or should I try to search around a little on the web for further information about anonymous classes?
+TimpisHouse You can move on, sure. I mainly use anonymous classes only when responding to Swing button clicks, and then you get used to just doing the procedure for creating some onclick code and not worrying about it. When you can add some code to a button, or start a thread using an anonymous class, you've basically grasped all you really need to know about it. You can even just never use them at all if you don't like them.
+John Purcell Thanks a lot for the good and fast response. Also i notcied that you had an android icon on your desktop, do you have an android and/or a "callback/alerting" tutorial as well?
+TimpisHouse Sorry I missed this. I do have an android course, it's free on my site, but a bit old (uses Eclipse instead of Android Studio). I don't think I cover callback/alerting though -- not sure what it is. I cover onclick-type stuff of course, if you mean this stuff.
Beautifully explained. Thanks
Clear and articulate! Was that you playing the Beethoven concerto?
Junky Baller I wish it was, but no, it was Debbie Hu.
Thanks for this John (as ever). May I make a suggestion (I've thought it for the last few videos in this course on more difficult topics, but have been prompted by your closing remark about GUI programming); I appreciate it's too late for this course. You explain things really clearly, but beginners may struggle to understand why it's necessary to have these techniques. A good example is lambda expressions (in Java 8): explaining them might make sense but the beginner may struggle with why are they necessary / where to use them / what problem they solve. It may help understanding to add some brief observations about how the technique might be deployed in the real world / why it exists. Thanks again.
Thanks Alphonso, you're not the first to say it. If I remake the course one day, I'll add more exercises at least. With lambda expressions it's particularly tricky to give examples, because I can't think of many examples that would really make sense to a beginner. Perhaps I could have illustrated using the Timer class. But then there's still not much you can usefully do with a Timer unless you know some Swing or something.
Great and simple
Insanely well explained! Thank you so much; this has probably been the hardest concept to grasp this far
So simple yet so powerful! Thank you for this beautiful tutorial❤️
you exactly told what i want to hear and for which i was about to hit my head on wall . That how SetOnClickListener and ClickListener is working what the hell wrong with my udnerstanding on this code and after looking at your example i will look again the code and will surely make the sense after learning from your tutorial...thanks a bunch ....!! great tutorials i must accept...!!
Thanks for our comments?! No...Thank YOU for these tutorials! I can't wait to complete this beginners course so I can move on to some of your other courses at caveofprogramming. You are giving hope to my dreams of making a career change. Thanks!
- Great Series of Tutorials... - Thank You - !
- Did You make the follow-up video that further demonstrates this concept / technique when used in conjunction with GUI programming - (?)
D.
I feel like I am on the symphony at 9 am)) Relaxing music)
Hi John!!
I just want to say thank you again for all your free videos and have a marry Christmas!!
*** also i dont really understand the concept of the anonymus classes, for what reason we use them, and the methods declared in anonymus classes are the onese being displayed when the methods are overwritten from other classes. Why is that so?
I am still stuck on this level even tho i started watching Swing tutorial aswell..
I have watched these beginners tutorials two times and there are some things i still dont understand or i understand but cant really remember how to use it, is that normal?
I have way too many questions but i know you dont have time answering them all, so once again Marry Christmas.Ah yeah and you should try duck breast and red cabbage, thats a traditional hungarian dish for Christmas!
Cheers
great video! You've explained it in the best possible way for begginers!
John, do you have anything on type alias in Java? I think I know that Java doesn't do type alias but I want to get your thoughts.
I like the music and the chill lecture tone.
i was having so much trouble for tht curly braces understanding ... thnk u so much for simple trick ... :) :)
Your tutorials are amazing.
Thank you.
Perfect explanation. Thanks!
awesome, best tutorials ever, very simple and clear.
perfect explanation!
Love your tutorials, all the best man
Perfect explanation, the best on RUclips.
Excellent............!
This is pretty important for Android Development where you have to make your own event listeners .
thnx
Thank you very much
Can new methods be added to the anonymous class? Or only overridden methods from the extended class or implemented interface?
Im going to listen to your soothing voice to help me fall asleep
thanks for effort. Good job.
500 views? I dont get it, best Tutorial vids I found on youtube so far...
Super..
excellent sir Thanx!!
beautifully done...thanks!
Excelllent lecture :)
Perfect Tutorial!!! Great Job!!!
love this tutorial!!!!
Man you are a legend.
I hope (in the near future) to financially contribute to the cave. Thank you.
Very clear, great job, thank you!
Thank you so much lad!
This is one of those topics that separates the C/C++ programmers who know a bit of Java, or dabblers, from people who really know how to use Java. It still looks weird and tripped out to me as a mostly C/C++ programmer but I'll watch this video until it seems like the most natural thing in the world, because as you point out, you want to focus on what the programmer is trying to accomplish in places where they use anonymous classes, not put off by and looking funny at this construct.
thanxx for this lesson..!!1
Thx 4 posting...:)
Please explain how you run program containing multiple classes within single *.java file.
I understand that this is for learning purposes, but sometimes I want "to see whole picture" in one sight to elaborate something. Thanks n advance.
HERO!
Thank you so much. Super helpful
can we use super with anonymous classes?If yes, then how?
this great vidio thakyou sir, i can create anonymous class for completly my scholl job btw im from indonesian
thanks !!! :)
very useful, thanks
Stay Blessed John.
Very Helpful .....
Thank you. You really helped me :)
lol it's like a bastard child, it doesn't have a name. It's a jon snow class, that's how i'll think of it.
please what is the reason behind the machine.start(); not displaying?
Which bit of the video do you mean?
lovely Tutorial. Thank you.
WOW, that's really cool.
thanks youuuuuu from Morocco
Elegant
Is this like the OOP version of Lambda's?
+xXxBladeStormxXx Yes, sort of. This is the way you had to do it before lambdas came along. Now if your interface only has one method, you can use a lambda expression instead.
***** Thanks for the prompt reply.
I also want to express my deep gratitude for these free videos. I already know other programming languages and I wanted something that taught me Java style and syntax quickly, and that is exactly what this series has done. Thank you for this.
thanku v much...
is it just me or is there no sound in these videos?
thank-you
very nice tutorilas, vice husky voice
thank you!
thanks
OMG you sound sooo much like John Lennon mate!
If I had a child, I'd give it a name "Machine". :D
Thanks ;)
exquisite!!
+Mohamed Sabri Ben Chaabane Exquisite, also very exquisite! *Walks off a cliff after admiring a row of paintings.* Not so exquisite. Ahhhhhhhhhhhhhhhhhhh!!!!
were mics this bad in 2012? Classic.
In the beginning I thought lord jesus is speaking.
Thank you very much.