Abstract classes can have non-abstract methods. For that matter you can have an abstract class with no abstract methods (though you would not want to do this). But a abstract method can only be present in an abstract class.
Mohamed Sanaulla wrote:For that matter you can have an abstract class with no abstract methods (though you would not want to do this).
You might want to do that. See HttpServlet, for example. Or java.awt.event.MouseAdapter. In both cases you need to override at least one of several methods to make it useful, but if they were marked abstract you'd have to implement all of them.
To me abstract just means "there's no reason to ever instantiate this, so stop anyone doing it, as it would be a mistake". It's a semantic issue. If you see something is abstract, you know it is only meant to be subclassed.
subject: implementing abstract method in one class in another abstract class