04 2014 档案
摘要:The beginning of this chapter introduced the idea of writing code that can be applied as generally as possible. To do this, we need ways to loosen the...
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号