Java Tutorial 3.4 Classes Part 4/12 - inheritance
Loading...
3,561
Uploader Comments (Zantorc)
see all
All Comments (3)
-
good video
thanks so much
-
good one...
Loading...
nice nice now how to we extend exactly?!
Same Folder? same File? Same note pad? share methods?
what about loops withing the so called "super Class?"
how do i extend within it?
as if i had a MAIN method in the super class,and a loop that the extended class will use it? with print statements..
i am so Confused
well this is what pisses me off , all i hear is class and sub class , well the word " EXTEND " is Self explainory.. but How to implement that in java?!?!?!
hmb010 2 years ago
The next lecture deals with packages. It is concerned with where classes are located within the file system on your machine and answers the first part of your question.
A class is just a way of grouping data and methods together. In simple terms just imagine that all the data and methods in the superclass are put into the front of the subclass. So obviously a subclass can potentially call any superclass method (thought there are complications see lecture 17 and 18).
Zantorc 2 years ago
For a method in a superclass to call a subclasses method doesn't make sense. You can only do it if you have a reference to an object which is of the subclass type (or the method is static). In other words, you cant do it directly like you can in the other direction.
I'm not sure I understand your last problem.
Zantorc 2 years ago