7-Apr-15 Polymorphism 2 Signatures In any

7-Apr-15 Polymorphism 2 Signatures In any
1 / 1
7-Apr-15 Polymorphism 2 Signatures In any - slide 1 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 2 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 3 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 4 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 5 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 6 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 7 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 8 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 9 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 10 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 11 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 12 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 13 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 14 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 15 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 16 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 17 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 18 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 19 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 20 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 21 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 22 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 23 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 24 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 25 of 26 7-Apr-15 Polymorphism 2 Signatures In any - slide 26 of 26
7-Apr-15 Polymorphism 2 Signatures In any programming language, a signature is what distinguishes one function or method from another In C, every function has to have a different name In Java, two methods have to differ in their names or in

Related Topics

Download this presentation From Below

"7-Apr-15 Polymorphism 2 Signatures In any" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentation Transcript

01
7-Apr-15 Polymorphism<br>
02
2 Signatures In any programming language, a signature is what distinguishes one function or method from another
In C, every function has to have a different name
In Java, two methods have to differ in their names or in the number or types of their parameters
foo(int i) and foo(int i, int j) are different
foo(int i) and foo(int k) are the same
foo(int i, double d) and foo(double d, int i) are different
In C++, the signature also includes the return type
But not in Java!<br>
03
3 Polymorphism Polymorphism means many (poly) shapes (morph)
In Java, polymorphism refers to the fact that you can have multiple methods with the same name in the same class
There are two kinds of polymorphism:
Overloading
Two or more methods with different signatures
Overriding
Replacing an inherited method with another having the same signature<br>