0

java terminology help: I was doing a java code in eclipse and it says to add keyword 'abstract' to base class

So I'm wondering what is the impact of adding an abstract method to a base class

9th Dec 2018, 6:42 PM
mya
mya - avatar
2 odpowiedzi
+ 1
When you are declaring class as abstract, you can't instantiate objects of that class. Java consider that class incomplete. Usually, it is somehow general, not concrete class. Concrete classes usually extend base class. On the other hand if class has one or more abstract method(s) it must be declared as abstract. So, if you add abstract method to a base class, that class must be abstract, and her subclasses has to implement that abstract method(s).
9th Dec 2018, 7:39 PM
vlada
+ 1
vlada okay I understand thank you
9th Dec 2018, 7:42 PM
mya
mya - avatar