title: How can I create a new class instance from a class within a (static) class?
body: <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: </p>
  
  <blockquote>
    <p>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>
  </blockquote>
  
  <p>This is possible in C# with static classes, how should it be done here?</p>