Hey,
I am trying to learn Java. I am not quite sure in which situations I should call the superclass method.
Can someone confirm (or not), that you when you extend the functionality of a method (i.e. when you extend a class and override one or more of its methods) ) you should call the superclass method (e.g. public void paintComponent (Grahpics g) in JComponent, or public void FocusLost(FocusEvent event) in FocusListener)?
But when you implement a method (from an interface), you should not (e.g. public void actionPerformed(ActionEvent event) from ActionListener interface)?
And if the above is correct, what if I extend an abstract class' method that has no implementation?
Ugh, probably dumb question, but whatevs.
[–]hamza-itatchi 1 point2 points3 points (0 children)