5 Replies Latest reply: Oct 13, 2008 2:54 PM by 795426 RSS

    Composition in java : how to access super-class from sub-class

    746591
      I have 3 classes related by composition

      class A{
           
      B b = new B();
      }


      class B{

      List<C> cList = new ArrayList<C>();
      }

      in class C{

      getSample(){
           //Try to access class A     
      }
      }

      how can I access A from class C ?

      Any help is appreciated!