[Solved] Defining Proper Classes with Java [closed]


MyClass and MyObj are the wrong way around, it should be:

MyClass MyObj = new MyClass();

Otherwise you are trying to declare an instance of MyObj which doesn’t exist. Instead you declare an instance of MyClass and name this MyObj. Hopefully that makes sense to you 🙂

solved Defining Proper Classes with Java [closed]