“For example, consider a stack (which is a first-in, last-out list). You might have a program that requires three different types of stacks. One stack is used for integer values, one for floating-point values, and one for characters. In this case, the algorithm that implements each stack is the same, even though the data being stored differs. In a non-object-oriented language, you would be required to create three different sets of stack routines, with each set using different names. However, because of polymorphism, in Java you can create one general set of stack routines that works for all three specific situations. This way, once you know how to use one stack, you can use them all. More generally, the concept of polymorphism is often expressed by the phrase “one interface, multiple methods.” This means that it is possible to design a generic interface to a group of related activities. Polymorphism helps reduce complexity by allowing the same interface to be used to specify a general class of action.”
―
Java: A Beginner's Guide
Share this quote:
Friends Who Liked This Quote
To see what your friends thought of this quote, please sign up!
0 likes
All Members Who Liked This Quote
None yet!
This Quote Is From
Browse By Tag
- love (101225)
- life (79173)
- inspirational (75713)
- humor (44294)
- philosophy (30915)
- inspirational-quotes (28819)
- god (26837)
- truth (24709)
- wisdom (24563)
- romance (24321)
- poetry (23217)
- life-lessons (22565)
- quotes (20933)
- death (20517)
- travel (19801)
- happiness (18930)
- hope (18506)
- faith (18356)
- inspiration (17279)
- spirituality (15668)
- relationships (15486)
- religion (15362)
- life-quotes (15270)
- motivational (15264)
- love-quotes (15114)
- writing (14927)
- success (14163)
- motivation (13116)
- time (12833)
- motivational-quotes (12094)