0
can abstract methods have body?
4 Antworten
0
Abstract methods have no implementation, so no. They are just blank methods used for the extending classes
0
But I have seen that by using default keyword before abstract method body can be declared
0
no.. you can't have a body in it.. abstract means just like headings.. u can have methods..
0
You can't have a body in an abstract method, there's no {} support whatsoever. Abstract methods are defined by the subclass. In those subclasses, the methods can have body.