How to reuse a single class within multiple projects, with minor modifications in functionality?
<p>I have a common library where I've put classes that are used between multiple Android projects. However, now I encountered a situation where I have to make minor changes to the functionality of the class in one project. How should I organize the classes, keeping in mind easy readability of code and future extension possibilities?</p>

<p>Should I</p>

<ol>
<li>Extend the class (MyClass) with modifications that are special to the subproject (MyClassSub extends MyClass)? What about if I have references to MyClass in the library classes, but in this special subproject MyClassSub should be called?</li>
<li>Have switch OR if clauses for each special part in the class file? And then pass some variable to the class?</li>
<li>Some other option?</li>
</ol>

<p>This is probably a trivial question, but I am quite new to java and can't quite figure it out.</p>
