{
void test ()
{
}
void test (int a)
{
}
void test (int a, int b)
{
}
double test (double a)
{
return a * a;
}
}
class Overload
{
{
Overloaddemo ob = new Overloaddemo ();
double result;
ob.test (10);
ob.test (10, 20);
result = ob.test (123.25);
}}
Java program to demonstrate concept of Polymorphism by function overloading.
Reviewed by
on
September 05, 2019
Rating:
No comments: