Differents kind of classes inherit from an abstract class in android java -



Differents kind of classes inherit from an abstract class in android java -

i have 2 classes (classa , classb) should listfragment. these 2 classes share behavior,thus created abstract class(abstractclass). abstractclass inherit listfragment. far have classa , classb inherit abstractclass inherit listfragment. problem comes when need classc should fragment(not listfragment) need behavior abstractclass, cant inherit because classc should fragment , abstractclass listfragment. have classa,classb , classc inherit abstractclass beingness classa,classb listfragment , classc fragment. im sure should design pattern in java or practice solve this.

i know java not allow multiple inheritance.

many thanks

can extract mutual functionality helper class? utilize composition instead of inheritance

java android oop

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -