//compile time polymorphism
class Adder{
public int add(int a, int b){
return a+b;
}
public long add(long a, long b){
return a+b;
}
}
public class Main{
public static void main(String[] args){
Adder example=new Adder();
System.out.println(example.add(5,10));
System.out.println(example.add(15L,20L));
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: