I'm not sure whether my last post is relevant to your question but I'll leave it anyway.
In the second case the inner class
is an outer class, whereas in the first example there is no parent-child relationship. So in the second case you can use the benefits (or curses) of polylmorphism and co., but in the first case you cannot.