Created
September 24, 2015 23:02
-
-
Save ekumachidi/ebdb4d2f1a764adc5538 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//class Example to illustrate polymorphism with the + sign | |
class Example{ | |
public void add(int a, int b){ | |
System.out.println(a + b); | |
} | |
public void addStatement(int a, int b){ | |
System.out.println("The sum of a and b is: " + (a+b)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment