Тёмный

Java Tutorial for Beginners - 14 - Inheritance and Objects 

EJ Media
Подписаться 170 тыс.
Просмотров 41 тыс.
50% 1

Опубликовано:

 

30 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 57   
@marybrantnall1768
@marybrantnall1768 9 лет назад
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
@EJMedia1
@EJMedia1 9 лет назад
Mary Brantnall glad to be of help )
@revoktorment440
@revoktorment440 8 лет назад
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
@hafsasaud7715
@hafsasaud7715 9 лет назад
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! :)
@EJMedia1
@EJMedia1 9 лет назад
Hafsa saud Thanks for the nice words - always glad to be of help
@Greg-cy2li
@Greg-cy2li 8 лет назад
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!
@Foodhomemade237
@Foodhomemade237 4 года назад
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.
@hmaan675
@hmaan675 7 лет назад
Teachers like you make education fun and interesting..... Thanks a lot
@nicogamon8924
@nicogamon8924 7 лет назад
You're the man dude! at the university I was completely lost but you explained it very clear and easy to understand. thanks buddy!
@keshavagarwal3981
@keshavagarwal3981 8 лет назад
best youtube channel for JAVA.
@todd_colwell
@todd_colwell 8 лет назад
This tutorial is very clear to follow. Thanks!
@tastyl2356
@tastyl2356 5 лет назад
if u use eclipse and want a shortcut for System.out.println() just use sysout {ctrl+space}
@aybin.v.k9562
@aybin.v.k9562 7 лет назад
Hey EJ Media, I''ve written my own code for inheritance and got it correct at the FIRST time itself... Thanks
@rayhanshuvo1619
@rayhanshuvo1619 9 лет назад
Simply the best.
@reddnebbula
@reddnebbula 7 лет назад
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.
@deepin2urheart
@deepin2urheart 2 года назад
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
@asjad8058
@asjad8058 10 лет назад
Best tutorials i have watched! Thanx!!
@EJMedia1
@EJMedia1 10 лет назад
Thanks glad they are helping you
@vizcarrae87
@vizcarrae87 10 лет назад
Wow! all your videos are very useful for me Thanks!!!!
@EJMedia1
@EJMedia1 10 лет назад
vizcarrae87 thank you so much :)
@ammarsadeq6078
@ammarsadeq6078 8 лет назад
what is the difference between creating a class by right-clicking the package name and creating class by going to the file?
@youtubeaccount0x073
@youtubeaccount0x073 5 лет назад
Short cut for system.out.println = sout {tab}
@vndosapp
@vndosapp 3 года назад
TYVM 4all this tuts, JAH bless you
@linglingzhang8583
@linglingzhang8583 5 лет назад
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
@TheZainmahmood
@TheZainmahmood 10 лет назад
Hi i just wanted to thank you for these Tutorials
@EJMedia1
@EJMedia1 10 лет назад
Glad you enjoy them - I should be posting some more soon. Also going to start one up on javascript
@Rick-v
@Rick-v 6 лет назад
These videos are amazing!
@acegameintuition4621
@acegameintuition4621 8 лет назад
You are the best!
@davidpalafox6978
@davidpalafox6978 4 года назад
What is void doing in the subclass?
@toriqulislamshimanto
@toriqulislamshimanto 7 лет назад
EJ is it necessary always give public before class for the object.
@EJMedia1
@EJMedia1 7 лет назад
Here is a good link that explains this: stackoverflow.com/questions/16779245/what-is-the-difference-between-public-class-and-just-class
@kharel123
@kharel123 10 лет назад
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.
@EJMedia1
@EJMedia1 10 лет назад
X-fade C# is nearly identical so if you learned Java you would have no problem mastering C#.
@SiddharthMaurya7
@SiddharthMaurya7 8 лет назад
WOW...NOW I GOT IT..!!!!!1
@RunAwayGamer
@RunAwayGamer 6 лет назад
can you extend multiple classes
@Soulfyres
@Soulfyres 5 лет назад
Yes
@MCMXXIV
@MCMXXIV 10 лет назад
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.
@EJMedia1
@EJMedia1 10 лет назад
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
@EJMedia1
@EJMedia1 10 лет назад
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.
@EJMedia1
@EJMedia1 10 лет назад
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
@MCMXXIV
@MCMXXIV 10 лет назад
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
@EJMedia1
@EJMedia1 10 лет назад
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!
@humbleDon96
@humbleDon96 8 лет назад
why did you write 'void' in the subclass method? btw these vids are exceptional
@rileytallman
@rileytallman 7 лет назад
"void" is the return type of the method. Does that answer it?
@ForbesyGames
@ForbesyGames 9 лет назад
Your working backwards to what i am used to but that's fine, i usually make the main first then all of the other stuff
@Getaneh188
@Getaneh188 9 лет назад
Do you use this in the in the real world?
@Getaneh188
@Getaneh188 9 лет назад
EJ Media I am taking advanced java and I am pretty much good at it so far. But I am just curious if we really apply this to the real task. Thank you.
@EJMedia1
@EJMedia1 9 лет назад
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
@Getaneh188
@Getaneh188 9 лет назад
EJ Media God bless you. very helpful.
@julicas76
@julicas76 6 лет назад
thx
@foreignwarren7361
@foreignwarren7361 6 лет назад
6:45 Roxanne!!!
@dannyd8871
@dannyd8871 10 лет назад
what does void mean?
@EJMedia1
@EJMedia1 10 лет назад
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
@dannyd8871
@dannyd8871 10 лет назад
EJ Media ok thnx these tutorials r gr8t.
@EJMedia1
@EJMedia1 10 лет назад
Danny D Thanks I am getting some good feedback so I will keep making many more
@vedhrc5097
@vedhrc5097 8 лет назад
+1000
Далее
Java Tutorial for Beginners - 16 - Constructors
9:32
Самое большое защитное стекло
00:43
Voy shetga man aralashay | Million jamoasi
00:56
Просмотров 648 тыс.
无意间发现了老公的小金库 #一键入戏
00:20
Python Decorators in 15 Minutes
15:14
Просмотров 448 тыс.
Object Oriented Programming - The Four Pillars of OOP
11:23
Learn Java in One Video - 15-minute Crash Course
14:54
Просмотров 750 тыс.
#48 What is Inheritance in Java
8:47
Просмотров 141 тыс.
Java multithreading 🧶
15:18
Просмотров 131 тыс.
Самое большое защитное стекло
00:43