attributes - Java Beginner: Subclasses and Superclasses -Can you remove values? -


i'm java beginner , i'm looking subclasses , superclass's.

i know can add values/attributes/behaviour aren't in superclass subclass make more 'task specific'.

but question is, can remove attribute or behaviour value belongs in superclass subclass?

extend implies inheritance. don't have precise choice on can inherit , can't.

if parent class has decided expose public variables etc, sub class cannot alter that.

if parent class doesn't want expose fields can marked private.

also: class should open extending closed changing it.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -