Answers for "exp on mathed overlading in java"

1

exp on mathed overlading in java

class DisplayOverloading2
{
    public void disp(char c)
    {
        System.out.println(c);
    }
    public void disp(int c)
    {
       System.out.println(c );
    }
}

class Sample2
{
    public static void main(String args[])
    {
        DisplayOverloading2 obj = new DisplayOverloading2();
        obj.disp('a');
        obj.disp(5);
    }
}
Posted by: Guest on November-02-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language