Community
Participate
Working Groups
When you try to construct an abstract class MyClass, you get the error The type MyClass can not be instantiated Now this may seem obvious to some people, and will seem obvious to me from now on, but the first time I got this error, I spent 5 minutes trying to figure out what the problem was, I simply thought there was something wrong with the constructor, or Eclipse was buggy, etc. Then I decided to look at the class definition itself. Changig this to The type MyClass can not be instantiated because it is abstract or The abstract type MyClass can not be instantiated would be much clearer.
Actually, other forbidden scenarii using the same problem message are: - attempting to allocate a base type - attempting to allocate an interface
Changed error message to read: "Cannot instantiate the type MyClass, since it is not a concrete class" Is it ok ?
Marking as fixed (reopen if you disagree)
Verified.