Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is method Overloading in the perspective of OOPS?

Answers were Sorted based on User's Feedback



What is method Overloading in the perspective of OOPS?..

Answer / aruna

Two or more methods in the same class having same method
name with different parameters may or may not have same
return type is called method overloading

Is This Answer Correct ?    23 Yes 0 No

What is method Overloading in the perspective of OOPS?..

Answer / kabita

In same class more than two methods having same name but
different signatures are called method
overloading .signatures are
no of parameters,datatypes of parameters,sequence of
parameters.returntype may same or not.

ex:public int add(int a,int b)
{
S.o.p(a+b);
}
public int add(int a,int b,intc)
{
S.o.p(a+b+c);
}
public double add(double d,double e)
{
S.o.p(d+e);
}

Is This Answer Correct ?    8 Yes 0 No

What is method Overloading in the perspective of OOPS?..

Answer / md.meraz uddin

The system which have diffrent method in same class or same signature i.e inheritance , polymorphism etc that is called overlaoding.
For example:-
class A
{
public void add(int a, int b);
System.out.println(a+b);
}
public void add(int c,int d,int e);
{
System.out.println(c+d+e);
}

Is This Answer Correct ?    5 Yes 0 No

What is method Overloading in the perspective of OOPS?..

Answer / anand

mathods having same name but different signature in same
class known as method overloading

Is This Answer Correct ?    8 Yes 5 No

What is method Overloading in the perspective of OOPS?..

Answer / amarnath88888

Two or more methods having same name but different
signatures in the same class or in super class, sub
class(inheritance) then, that method is said to be
overloaded method.
This process is known as method overloading.

Note: Signature of a method means
1) no. of parameters
2) type of the parameter
3) order of the parameters

And a method cant be said as overloaded method only with the
change of the return type alone.

For example,
1) //for no of parameters

void display(int a,int b,int c)
{
System.out.println("This is 3 arguments method");
}

void display(int a,int b)
{
System.out.println("This is 2 arguments method");
}

2) //for type of parameters

void display(int a,int b)
{
System.out.println("This is 2 int arguments method");
}

void display(float a,float b)
{
System.out.println("This is 2 float arguments method");
}

3) //for order of parameters

void display(int a,float b)
{
System.out.println("This is int,float argument method");
}

void display(float a,int b)
{
System.out.println("This is float,int argument method");
}

Note: // cant determine only with return type

void display(int a,int b)
{
System.out.println("This is 2 arguments method without
return type");
}

int display(int a,int b)// compile error here
{
System.out.println("This is 2 arguments method with return
type");
}

Is This Answer Correct ?    5 Yes 2 No

What is method Overloading in the perspective of OOPS?..

Answer / vasu

in Method Overloading only Methodname,Arguments consider
Ex:-
one(int a,float e){
}
one(float r,int q){
}

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

Can we catch more than one exception in a single catch block?

0 Answers  


What are the important features of Java 9 release?

0 Answers  


where the static methods will live ,on stack ? can you explain brefly

1 Answers  


What is an exception? difference between Checked and Unchecked exception in Java

0 Answers   SkillGun Technologies,


I am unable to find or learn about print command. I have a graphical program in core java in applet but i want to give print command but i have coding for that so if anyone know about this plz mail me on avdhesh_chauhan007@yahoo.co.in

0 Answers  


Explain differences between collection api and stream api?

0 Answers  


Which is faster set or list in java?

0 Answers  


How many bytes is 255 characters?

0 Answers  


what is j2se

3 Answers  


how to write a program for sending mails between client and server

0 Answers   Lampex,


What method is used to compare two strings ?

4 Answers  


What is hash method?

1 Answers  


Categories