How to access methods and instance variables of an abstract class ?
Whenever, lets say, a class is marked abstract and it got both abstract and non-abstract methods and since we cannot make objects of an abstract class(i.e. we can't instantiate abstract classes), So, how can we access non-abstract methods from outside the class ?
Can anyone please explain it with some fully functional example ?
You would have to instantiate it as a subclass. The fields should all be private and accessible via getXXX() methods. Look at my Bus class here, which is in response to a different question. So you are going to have to think how to generalise it.
keep an eye out for scorpions and black widows. But the tiny ads are safe.