- Polymorphism : it means that an entity can be used under many forms. For example, if we have a method called method(), the polymorphism allows to use it with another implementation like : method(p1) or , method(p1, p2) or any other form using the same name method. This can be helpful for an developer, because he shouldn’t know the types or the number of the parameters.
- Encapsulation : it is a mechanism to restrict access to object’s components by other objects. It is useful to change object’s data structure without changing its interface, so it isn’t necessary to change the classes using this interface. this mechanism imposes a loose coupling.
- Inheritance : it allows the reuse of the object’s characteristics by another one and the object’s adaptability by using the polymorphism’s concept. Inheritance allows to child class to extends the properties of the mother class.
See also :
5 comments
No ping yet
Monster Beats Studio says:
October 6, 2011 at 4:49 pm (UTC 0)
What would be your next topic next week on your weblog?
Javin @ java hashmap tutorial says:
August 20, 2011 at 3:07 am (UTC 0)
In my opinion polymorphism is great and if used correctly it gives you immense capability to write flexible and extensible code
here are few benefits of polymorphism in my opinion:
1) Runtime binding using method overridding.
3) writing code for interfaces and not for implementation.
By the way I have also shared my experience as What is polymorphism in Java , let me know how do you find it
jalal mjadli says:
August 22, 2011 at 10:01 am (UTC 0)
Interesting comment…
car repo says:
August 5, 2011 at 6:26 pm (UTC 0)
your site is very cool! Impart, its time to go now for enjoying life in sunny day!
iphone5reviewed.com says:
August 5, 2011 at 10:23 am (UTC 0)
most broadband services are crappy, they can’t maintain high data transfer rates~