I\'m new to Java (have experience with C#),
this is what I want to do:
public final class MyClass
{
public class MyRelatedClass
{
...
}
Yes, non static nested classes have access to the outer classes instance members, and therefore must be created for an instance of the outer class. So you have two choices:
In practice, I rarely create an instance of the inner class, except in methods of the outer class, and I rarely make such classes mutable -- but this is just me.