When should you use a private/inner class?
https://softwareengineering.stackexchange.com/questions/81499
-
01-11-2019 - |
题
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.
没有正确的解决方案