I have a class MyClass and an inner class MyNestedClass like this:
MyClass
MyNestedClass
public class MyClass { ... public class MyNestedClass {
You could create abstract base classes that you extend in both.
However, if those classes are large, you might be better off re-evaluating your class design and see if you can refactor into classes which represent one concern each.