//https://csprograms4u.blogspot.com/
//Chapter 3
//Program 5
//Method Overloading
class
MO
{
void abc(int a,int b)
{
System.out.println(a+b);
}
void abc(double i,double j,double k)
{
System.out.println(i+j+k);
}
}
public
class MethodOverloading
{
public static void main(String args[])
{
MO obj=new MO();
obj.abc(1,2);
obj.abc(1.1,2.2,3.3);
}
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.