-2

If so, what is meant by not instantiable? If not, what other restrictions apply?

What is the advantage of declaring a method as not instantiable in a supertype? When is this useful?

0

According to Oracle:

Types and methods can be declared NOT INSTANTIABLE when they are created.

If a type is not instantiable, you cannot instantiate instances of that type. There are no constructors (default or user-defined) for it. You might use this with types intended to serve solely as supertypes from which specialized subtypes are instantiated.

I read that as "You can only instantiate such objects as part of a supertype." So it sounds like it works just like an abstract type in Java. Whether it's part of a table or not seems irrelevant.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.