摘要
一个类中多个重载的方法,体现了程序编译时的多态,具有很大的灵活性;而利用类的继承过程中出现的重写方法,可以实现程序运行时的多态,大大提高了程序的适应性。重栽和重写形式上的相似,加大了学习者理解的难度。本文通过实例讲述了二者的用法,以求为开发者提供借鉴。
A class of multiple overloaded methods,reflecting the multi-state program compiled with great flexibility;The use of class inheritance override methods emerged in the process can be achieved when running multiple states,greatly improve the adaptability of the program.Overloading and override similar form,increasing the difficulty of understanding the learner.This paper describes two instances of the use,in order to provide a reference for developers.
出处
《计算机光盘软件与应用》
2011年第5期156-156,共1页
Computer CD Software and Application
关键词
重载
重写
多态
继承
Overloading
Rewriting
Polymorphism
Inheritanee