OMG!!!! As a Java beginner. This is the first time I understand Polymorephism clearly. I really love your voice and the way you teach. You are amazing teacher Bro!!
@thenewboston what if im trying to integrate this new cool stuff into my general animallist class, how I do it without any errors? XD as a matter of fact I was coding it, but received a nullpointer Exception. My Program added the dog and it was also barking, but the fish wasn't added…
I'm a bit confused of where to put the square brackets [] when you create an array. In tutorial 55, Bucky placed the square brackets like this: food bucky[] = new food[2]. He placed it at the array name for the left side of the equal sign, and placed the other square brackets beside the class name. But int this video, and in the previous one as well, he placed both square brackets with the class name: Animal[] thelist = new Animal[2].
So when you create the Animal array with Animal[] thelist= new Animal[2], I understand the thelist=new Animal[2] part, what does the Animal[] actually do or what would you call it. I've seen people create a array class of a different class and was curious was that does. For example, Dog[] thelist=new Animal[2] or Fish thelist=new Animal[2]. And also, would Animal[] thelist=new Fish[2] be possible or would it throw a error? I assume it would because Animal is the parent class?
Why this program shows me an error when I don't put noise() in Animal class? Technically I'm calling noise() of Dog and Fish class not of Animal class….
Any1 please write me the same thing with normal for loop. Cause I can't understand a shit and the strange for loop doesn't work for me. Something with 1.5 source lvl. Please 😀
It's kind of sad to see these videos lose views overtime. This video has over 20,000 views less than the array holding one. Almost 20,000 people gave up (Excluding ones that may just need a refresher on or learn a specific concept, or the ones who have not yet continued but plan to).
i made the array thelist[1] with 1 as an index i wanted to use thelist[0] for fish class and thelist[1] for the dog class but an error pops up when i run the program can anyone explain?
Just gonna share this in case anyone needs to know:
if you want to set an object to a string or int or whatever, the method in the object has to return that sort of data type. so if you want to use "ruff" from Dog in the animals class, u must return the string ruff in the noise method in Dog, and then set it to a string variable in the main class, and finally use that recall variable u just made in the main class in the object for Animal. I just spent 2 hours figuring this out cause im stupid and dont want anyone else to suffer the same fate
I LOVE THIS TUTORIAL.
𝘴𝘸𝘪𝘯𝘦 𝘧𝘭𝘶???
That cough.. swine flu…. in 2020 as soon as I heard it i already thought Rona D: LOLOL
You could make the noise method in Animal class an abstract method.
cough ugh…corona virus.Hahahaha.
OMG!!!! As a Java beginner. This is the first time I understand Polymorephism clearly. I really love your voice and the way you teach. You are amazing teacher Bro!!
why did he stop making videos?
swine flu lmao so 2009
Gear work!
@thenewboston what if im trying to integrate this new cool stuff into my general animallist class, how I do it without any errors? XD as a matter of fact I was coding it, but received a nullpointer Exception. My Program added the dog and it was also barking, but the fish wasn't added…
感谢 + Thank u
dog cannot be converted to ANimal/.
hi there ranky akab..incase u r reading this 😀
I'm a bit confused of where to put the square brackets [] when you create an array. In tutorial 55, Bucky placed the square brackets like this: food bucky[] = new food[2]. He placed it at the array name for the left side of the equal sign, and placed the other square brackets beside the class name. But int this video, and in the previous one as well, he placed both square brackets with the class name: Animal[] thelist = new Animal[2].
Glurp Slurp.
How do i assign the value of 100 objects to array indexes in an efficient way then??
My dog go, "Russ russ"
So when you create the Animal array with Animal[] thelist= new Animal[2], I understand the thelist=new Animal[2] part, what does the Animal[] actually do or what would you call it. I've seen people create a array class of a different class and was curious was that does. For example, Dog[] thelist=new Animal[2] or Fish thelist=new Animal[2]. And also, would Animal[] thelist=new Fish[2] be possible or would it throw a error? I assume it would because Animal is the parent class?
I learned more about programming from watching your old 8-minute videos than all of my hour-long college classes combined. Unbelievable. :/
OMG, that was so clear!!! I think I finally understand polymorphism now -.-
I'm pretty sure my lecturer just writes down what you say in these videos and repeats it as a script in lecture..
you kept the promise buck. you made me pro in polymorphism! buck's the man!
ohug. swine flu😂
Why this program shows me an error when I don't put noise() in Animal class?
Technically I'm calling noise() of Dog and Fish class not of Animal class….
if anyone has a problem with getting it to work, I had to make my methods all static otherwise it threw an error
Java should add these tutorials in their product. Who agrees with me?
"Glurp Slurp" – That's what she said.
say glurp slurp one more time.
We did same thing in polymorphic array?
an easier way…
Animal theList[] = new Animal[2];
theList[0] = new Dog();
theList[1] = new Fish();
6:12
"and then shhfshfseusfksd"
lecture on interface????
And now for your "Buckies greatest hits!"
1:58 if I where a fish, ide say glurp slurp
Currently the views on this video are 187,187
Any1 please write me the same thing with normal for loop. Cause I can't understand a shit and the strange for loop doesn't work for me. Something with 1.5 source lvl. Please 😀
It's kind of sad to see these videos lose views overtime. This video has over 20,000 views less than the array holding one. Almost 20,000 people gave up (Excluding ones that may just need a refresher on or learn a specific concept, or the ones who have not yet continued but plan to).
So, what's the difference between this program and the one made in tutorial 55?
i made the array thelist[1] with 1 as an index i wanted to use thelist[0] for fish class and thelist[1] for the dog class but an error pops up when i run the program can anyone explain?
Just gonna share this in case anyone needs to know:
if you want to set an object to a string or int or whatever, the method in the object has to return that sort of data type.
so if you want to use "ruff" from Dog in the animals class, u must return the string ruff in the noise method in Dog, and then set it to a string variable in the main class, and finally use that recall variable u just made in the main class in the object for Animal. I just spent 2 hours figuring this out cause im stupid and dont want anyone else to suffer the same fate
A tip for anyone interested. You can fill the array an easier way.
theList[0] = new Dog();
theList[1] = new Fish();
I think it's easier doing this than writing more code out. Any thoughts?