Results 1 to 10 of 10

what do you mean by method overloading?

This is a discussion on what do you mean by method overloading? within the Programming forums, part of the Web Designing & Development category; what do you mean by method overloading?...

  1. #1
    Junior Member
    Join Date
    Jun 2017
    Posts
    28

    Default what do you mean by method overloading?

    what do you mean by method overloading?

  2. #2
    Senior Member
    Join Date
    Nov 2016
    Posts
    152

    Default Re: what do you mean by method overloading?

    Method is same as sub function in other languages and by overloading a method is making a sub set of that method nothing else.

  3. #3
    Senior Member yatishkumar's Avatar
    Join Date
    Jul 2017
    Location
    Bangalore
    Posts
    100

    Default Re: what do you mean by method overloading?

    Method Overloading is nothing but overriding subclass method with superclass method.

  4. #4
    Senior Member
    Join Date
    Oct 2017
    Posts
    119

    Default Re: what do you mean by method overloading?

    Method Overloading is a feature that allows a class to have more than one method having the same name, if their argument lists are different. It is similar to constructor overloading in Java, that allows a class to have more than one constructor having different argument lists

  5. #5
    Member
    Join Date
    Jul 2017
    Posts
    63

    Default Re: what do you mean by method overloading?

    Method overloading is one of the ways through which java supports polymorphism. Method overloading can be done by changing number of arguments or by changing the data type of arguments. If two or more method have same name and same parameter list but differs in return type are not said to be overloaded method

  6. #6
    Senior Member
    Join Date
    Dec 2017
    Location
    US
    Posts
    211

    Default Re: what do you mean by method overloading?

    Quote Originally Posted by yatishkumar View Post
    Method Overloading is nothing but overriding subclass method with superclass method.
    Why does overloading involve overriding here.

  7. #7
    Member
    Join Date
    Mar 2018
    Location
    Santa Clara, California, USA
    Posts
    40

    Default Re: what do you mean by method overloading?

    Overloading refers to the ability to use a single identifier to define multiple methods of a class that differs in their input and output parameters. Overloaded methods are generally used when they conceptually execute the same task but with a slightly different set of parameters. It is a concept used to avoid redundant code where the same method name is used multiple times but with a different set of parameters.

  8. #8
    Member
    Join Date
    Aug 2017
    Location
    India
    Posts
    74

    Default Re: what do you mean by method overloading?

    Method overloading:


    Method overloading is a feature that allow the class to have more then one method having the same name but with the different parameter is called method overloading.


    eg. class A
    {
    public void display(char a)
    {
    System.out.println(a);
    }
    public void display(char b,int num)
    {
    System.out.println(b+""+num);
    }
    }


    In above example class A is having 2 methods with same name display but it have different parameters i.e. method overloading

  9. #9
    OPH
    OPH is offline
    Senior Member
    Join Date
    Sep 2017
    Location
    DELHI, INDIA
    Posts
    391

    Default Re: what do you mean by method overloading?

    Quote Originally Posted by yatishkumar View Post
    Method Overloading is nothing but overriding subclass method with superclass method.
    What you want to say? Can you be more clear to your answer?

  10. #10
    Junior Member
    Join Date
    Apr 2018
    Posts
    15

    Default Re: what do you mean by method overloading?

    If the class has one or more methods having same name but differ in argument list are said be overloaded methods and the process is called method overloading.