java - Is it possible and meaningful to make the superclass abstract? -


i told that: class can extend concrete superclass , override implemented method make abstract.

if method becomes abstract, corresponding superclass should become abstract too.

is correct? if so, meaningful make superclass or method in superclass become abstract?

to contain abstract methods class must declared abstract.

abstract methods can used behaviour specific each subclassing object. although can achieved through interfaces, may prefer use abstract class can contain implemented methods, or may wish declare fields not static , final. beware when class becomes abstract can no longer instantiated.

read more abstract classes here.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -