Original Post
🔒 Locked
[java] Vice versa
Advertisement
Seems like the same tpye of inheritance questions over and over.
As long as Class B extends Class A, Class B will have all of the methods of Class A. Just remember in the constructor for Class B to call the constructor for Class A right away.
Example
Now when you create an object of Class B, it should have the method do something. B.doSomething();
Hope that helps.
War doesn''t determine who is right, war determines who is left.
As long as Class B extends Class A, Class B will have all of the methods of Class A. Just remember in the constructor for Class B to call the constructor for Class A right away.
Example
|
Now when you create an object of Class B, it should have the method do something. B.doSomething();
Hope that helps.
War doesn''t determine who is right, war determines who is left.
I think he meant the following:
''creature'' = ''object''? :D
''creature'' = ''object''? :D
|
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement