To clarify, what I'm asking about is public class A{    private/*or public*/ B b;}vs. public class A{    private/*or public*/ class B{        ....    }}I can definitely think of some reasons to use one or the other, but what I would really like to see are convincing examples that show that the pros and cons are not just academic. 
When should you use a private/inner class?
object oriented design;class design
They are typically used when a class is an internal implementation detail of another class rather than a part of its external interface.  I've mostly seen them as data-only classes that make the internal data structures cleaner in languages that don't have a separate syntax for c-style structs.  They are also useful sometimes for highly customized, one-method derived objects like event handlers or worker threads.  