I earlier learned that abstract class can extend concrete class. Though I don\'t see the reason for it from JAVA designers, but it is ok. I also learned that abstract class
This flexibility is especially useful when a system evolves and we don't want to disturb the existing code.
A simple example I could think of is consider a MSDocReader class. This class is part of the legacy system and many other applications depend on this.
Now the requirements change. We have to write classes for reading docx files, ppt and even xsl files.
The MSDocReader class contains methods which can be reused such as getting the size of the file in KBs, onnecting to the .Net framework (If I'm not wrong :-))
Now using this provision, we can write an absract class AbstractMSFileReader which will contain all the methods that are used in the MSDocReader. But this class will have the read method as abstract.
The reason being we want to force the developers to use their own version of read method. (We should not use inheritance as the inheritance clearly states that the subclass method will extend the functionality of the parent method. Reading a doc file and reading a excel file are 2 different things and they do not fall under the same hierarchy. )
And you may argue that the we can make an abstract class and make the MSDocReader class extend that abstract class. But it can happen that the MSDocReader class may be extending some other class and since java does not support multiple inheritance., it can create problems