Java override (Override) vs. overload (overload)
Override (Override)Overrides are subclasses that rewrite the implementation of the method that allows access to the parent class, and the return value and formal parameters cannot be changed.
Overload, override and overwrite English close, more easily confused, coupled with a variety of translations, the use of pigtailed, often is today clear tomorrow confused. These three concepts have been discussed separately in the previous chapters,
Referring to method calls, I think most people's first reaction is to execute a method Bai, in fact, in the eyes of the virtual machine method call is only to determine which method he is going to call, and the implementation of the method is still
http://blog.csdn.net/honglixx/article/details/3624934 1, what is the Chinese term for the override overload reintroduce? Override: Overwrite; Overload: Reload; Reintroduce: Redefine 2, override or overload a dynamic or virtual method in a parent
Introduction to JavaSE 15: Java object-oriented J rewrite (Override) and Overload (Overload)Override)
If the subclass is not satisfied with the method that inherits the parent class, you can override the method that inherits the parent class.
Overload: In the same class, the function name, return value or parameter type, the number of different is called overload.
Overwrite: A function with the same name, with the return value type, called overlay. refers to the child class's overwrite
Overload: As the name implies, it is over (re)--load (load), so Chinese names are overloaded.It can express the polymorphism of the class, can be the function inside can have the same function name but the parameter name, return value, type can not
Inheritance is essential to object-oriented systems. There seems to be nothing to say about inheritance. Everyone knows, isn't it just that a son can have his father's attributes and methods ~~~
Yes ~ Inheritance is the attributes and methods for
c++| functions C + + and Delphi function overlay (Override) and overload (overload)
Spacesoft "Night Sand"
In object-oriented programming, when a subclass inherits a function from a base class, a subclass might need to treat some of these
Overloading is the same method that can be processed differently depending on the input data, overriding the same method that the subclass inherits from the parent class, entering the data, but to make a response different from the parent class, you
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.