When I started glancing thru ABAP WD, what i realized was that we need to know the concepts of OO ABAP before we understand the WD concepts...
I would like to pen down some of the Object Oriented Concepts which are not too clear at first (and also some brain teasers in interviews)...
Difference between Abstract Class and Interface:
The main difference is that no implementation of method is possible in Interface(That is actually the characteristic of interface; only when you don know the method's functionality do you go for interfaces, also when you want the class to compulsorily implement few methods ).
Abstract methods, on the other hand, may have methods implemented. But, even if one method is abstract, the class containing it will be labelled abstract. Abstract classes are destined to be inherited. They cannot be instantiated as such (Objects cannot be created of Abstract Classes).
What I was perplexed about was the narrow cast and wide cast. If some one can tel me bout the real time scenarios where you can use these concepts, I will be really grateful.
Bye for now...........
I would like to pen down some of the Object Oriented Concepts which are not too clear at first (and also some brain teasers in interviews)...
Difference between Abstract Class and Interface:
The main difference is that no implementation of method is possible in Interface(That is actually the characteristic of interface; only when you don know the method's functionality do you go for interfaces, also when you want the class to compulsorily implement few methods ).
Abstract methods, on the other hand, may have methods implemented. But, even if one method is abstract, the class containing it will be labelled abstract. Abstract classes are destined to be inherited. They cannot be instantiated as such (Objects cannot be created of Abstract Classes).
What I was perplexed about was the narrow cast and wide cast. If some one can tel me bout the real time scenarios where you can use these concepts, I will be really grateful.
Bye for now...........
No comments:
Post a Comment