+ 1
Can anyone help me understand parent classes and child classes and subclasses
they are starting to become confusing or over lapping
13 Réponses
+ 4
ok keeva, good to know that, give SoloLearn java lessons and examples a try , write at least one code , then , share it here, I ll give you full explanation on classes and inheritance till I can , but you gotta take the first step
+ 3
have u written any inheritance based example code, so that we can explain in depth based on that code
+ 3
wow, you have used tag of java , there is no Inheritance in html & CSS ( it's not even a language) , and no good oops paradigm in PHP ( not sure of that ), but you are just trolling aren't you?
+ 3
trolling?? for what answers to a test I'm honestly asking for an understanding I never said I was good I said I am learning I am trying to get an understanding of what I'm learning i am sorry if im not as advanced as you'd like however the classes part as well as some other things are hard to understand without seeing examples yet I will just continue to find answers on the internet and i dont need to troll for anything thanks for helping much success to you!
+ 3
I have and thanks again I think I may need to start the course over it gets really hard with the classes i get mixed up thanks and I will send you the first code I try to make
+ 2
no I haven't could you show me one or help me to understand what you are saying I have written only basic php HTML codes some CSS I understand when you say inherited but I need to see the example kind of in my head so please show me one
+ 2
let me try to figure this out as well
+ 2
https://www.geeksforgeeks.org/inheritance-in-java/
in case someone really needs help
+ 2
hii keeva
see this example
of inheritance
public parent-it is declared as public
child1 extends parent- child class extends parent class
child2 extends child1-child2 extends child1 so child1 becomes parent class for child2
+ 1
yes i java a child class can inherit only one parent class,
parent class is the super class now and child1 is the child class of super class and child2 is the subclass of parent class
the reverse is not possible in java
0
thanks Bhavin Gada that helped a lot one more question?? So the child becomes the parent does it no longer have the ability to be a child or is it now only the child of the original parent OR does it stay in the same orders??
0
maybe that's confusing I'm asking once turned into a parent is that permanent or is the new parent always a child of the prior parent 😕
0
great then I got it thank you so much!!!!!!!!!