How can I create a new class instance from a class within a (static) class?
<p>I'm new to Java (have experience with C#),</p>

<p>This is what i want to do:</p>

<pre><code>public final class MyClass
{
    public class MyRelatedClass
    {
      ...
    }
}

public class OtherRandomClass
{
    public void DoStuff()
    {
       MyRelatedClass data = new MyClass.MyRelatedClass(); 
    }
}
</code></pre>

<p>which gives this error in Eclipse: "No enclosing instance of type BitmapEffects is accessible. Must qualify the allocation with an enclosing instance of type BitmapEffects (e.g. x.new A() where x is an instance of BitmapEffects)."</p>

<p>this is possible in C# with static classes , how should it be done here?</p>
