class MethodOverload{
void add(int a,int b){
System.out.println("Sum = "+(a+b));
}
void add(int a,int b,int c){
System.out.println("Sum = "+(a+b+c));
}
void add(int a,double b){
System.out.println("Sum = "+(a+b));
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter