摘要:
Ordinaryclassesandmethodsworkwithspecifictypes: eitherprimitivesorclasstypes.Ifyouarewritingcodethatmightbeusedacrossmoretypes,thisrigiditycanbeoverconstraining.One way that object-oriented languages allow generalization is through polymorphism. You can write (for example) a method that takes a bas 阅读全文