Overriding private functions - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Overriding private functions

cheekyianscheekyians Posts: 3Member
I have an abstract class that I want to be able to specify an abstract function, however the functions are ones which are automatically produced in the children and is set to private, the IDE will not let me change this and I cant tell the abstract class to have an abstract private class so is there anyway round this?
The solution could be to not have the function as abstract but then I'm not sure it will use the function of the childrens class as currently the class looks like this:

abstract public class Panels2 extends javax.swing.JPanel {

E ObjectIn;

public Panels2()

public Panels2(E x)

abstract public void update(E x);
abstract private void initComponents();

If I had a definition for the initComponents() function would the Panels2(E x) constructor then use the initComponents() function defined in this class or the one in the child?
Hope someone can help
Sign In or Register to comment.