Function Overloading
function overloading happens two or more function with the same name
with different parameters or arguments
fun(34);
fun("hello");
static void sum(int a){
System.out.println(a)
}
static void sum(String a){
System.out.println(a);
}
At compile time it's decide which function to take
no of argument should be different or no of type should be different
Comments
Post a Comment