5-1 ADD

Post date: Apr 2, 2014 7:12:11 PM

// Method Overloading in Java 

package add;

public class ADD 

{

        public static void main(String[] args)

        {

            add(5,8);

            add("he","llow");

            add('A','0');

        }

        public static void add(int a,int b)

        {

            System.out.println(a+b);

        }

        public static void add(String a,String b)

        {

            System.out.println(a+b);

        }

        public static void add(char a,char b)

        {

            System.out.println(a+b);

        }

    

}