Look at two things:
1) The error message.
Cannot instantiate the type MyRectangle
And
2) The class itself.
public abstract class MyRectangle extends MyextendedShape {
It's declared as an
abstract
class which specifically means "you cannot create an instance of this class, only of concrete derived classes".
Think of it as cars for a moment: Car is an
abstract
concept - you can't own a "Car", you own a "Mercedes" or a "Ford". More specifically, you own a "Mercedes"."AClass"."A180 CDI", or a "Ford"."Fiesta"."Zetec 1.1"
"A180 CDI" and "Zetec 1.1" are the concrete classes which derive from the abstract "Mercedes" and "Ford" classes, both of which are derived from the abstract "Car" class.
You can only instantiate concrete classes, not abstract ones - so your app will not compile and that means it doesn't produce an executable, so none of your changes are included in the EXE you find on disk and can execute!
Remove the keyword
abstract
and see if it compiles cleanly - until it does, you can't run it!