Easy learning with example program codes

Can we declare an abstract method as private?

Private methods are private to the class only. They are not polymorphic in nature i.e. we cannot inherit them, so it makes no sense to make a private method abstract. Making a method abstract means we have to override and implement it in a subclass, but since we can’t override private methods, we can’t make them abstract either.

Java interview questions on access modifiers

Please follow and like us:

Copyright © 2019 CodesJava Protection Status SiteMap Reference: Java Wiki