How can I create a new class instance from a class within a (static) class?
- by Mervin
I'm new to Java (have experience with C#),
This is what i want to do:
public final class MyClass
{
public class MyRelatedClass
{
...
}
}
public class OtherRandomClass
{
public void DoStuff()
{
MyRelatedClass data = new MyClass.MyRelatedClass();
}
}
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)."
this is possible in C# with static classes , how should it be done here?