I struggled to learn a lot of things in my intro to java course this semester at my university. I thought maybe it was because I wasn't very smart, and didn't understand things as well as other people, but after watching your tutorials, I can honestly say that I have learned more in a couple of hours (we never went over inheritance, which is something that would have made everything WAY easier) then I have all semester. Thank you very much. You have restored my love for computer science and technology after a semester of struggles :3
Same here, i was having trouble understanding everything in my course starting from the class explaining OOP. Ernie explains it so much better. Too bad i still have to go to my classes to get the diploma hehe
Thank you so much for these videos! I did intro to programming in my first semester of uni and understood pretty much nothing! But watching these videos has helped me learn so much! Im actually enjoying watching and learning how to code! :)
Watching other videos I didn't understand OOP nor inheritance, but now I do after watching your videos! The real world applications really help. Thank you so much!
I'm from science background and don't have even basic knowledge in computer science...so learning programming language is a big thing for me.. but after watching your videos my curiosity to learn has been increased.. Thanks a lot.
2 questions: Why did you repeat the gumdrop flavors so that it repeats when you run the program? And does it matter which object you use when you call the method and the variable, like using red or green? Thanks.
sir is these objects referencing is equivalent or atleast similar to macros whic we creat in excel or word to automate some tasks and when we require run it over and over again. please correct me if I am wrong
if the class gumdrop two string variable is static ( no changed, stay the same all the time), why not just directly put an method printout without using the variable/or attribute
Hi, I want to learn c# but I cant find any good videos. I've been told java and c# are very similar. Are they like 1:1 ? BTW, Your videos are the best, better than TheNewBoston.
In the subclass GumDrops, why did you just use "void" with the method/behaviour givemeCinnamon/givemeSpearmint instead of using "public void"....unlike in the subclass Candy. And also with your previous video "Introduction to Objects" you also use "public void" there as well in your method where you display the size of the Planet. Thank you.
Ah the good ole void. Void basically means you do not want to return anything to the calling method. If you want to return something you will put an int or String in your method such as: public int methodname () ..... if you dont want it to return anything (for instance just do a system print) you do a public void methodname (). I will explain this in detail in the future lessons - you will be an expert by episode 32
So at a basic level do you want your method to return a value - if not then you always use void. So lets say you just want your method to do a straight system.out.print to the output screen ... your really not returning anything your just printing out the value.
Java Tutorial for Beginners - 18 - Void and Return Methods will talk more about this. Also 3 episodes later on are Methods 1, 2, and 3. if you want you could watch all 4 of those now and then continue on where you left off
THANK YOU...that was such a very nice explanation regarding the "void" statement. I've learned a lot just from your 3 comments haha. Thanks. Ohhh but what is the difference then if I use just "void" instead of "public void"? Can you explain it using your example from the video... comparing your class "Candy" public void displaySugarAmount() to class "GumDrops" void givemeCinnamon() Thank you for your patience :D:D:D
mcmxxiv . The difference is that everyone and I mean everyone can see something tagged with public .. basically the whole world. Whereas if you do not use the public keyword it's considered to be a default situation and it restricts access only to everything inside the package. If it's marked public you can see it from classes outside the package so a class from outside the package could access that method. I will answer any questions you have no problem. ALSO make sure you watch, I think its episode 17 because its critical - I address the use of the public keyword - THATS A VERY IMPORTANT EPISODE!
Ben Freedom Well thats a good question. You don't really have to use OOD concepts with JAVA - it's considered good practice but not necessary. Many programmers dislike using inheritance so they create just a bunch of standalone objects - it's really what you prefer. Other programmers love inheritance and using interfaces so again its more your individual style. I happen to think using inheritance is fundamental since you don't want to constantly have to rebuild and rewrite code
Void means you are not returning anything to the calling method. I will explain that in later tutorials so I wouldn't worry so much about that right now