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 the purpose of having the concept of overloading?

Answers were Sorted based on User's Feedback



What is the purpose of having the concept of overloading?..

Answer / vinay

overloading is used to achieve reusability and extensibility

Is This Answer Correct ?    23 Yes 3 No

What is the purpose of having the concept of overloading?..

Answer / narendra

Method overloading is one of the ways that Java implements
polymorphism. It allows related methods to be accessed by
use of a common name. Use it when you actually do need
multiple methods with different parameters, but the methods
do the same thing.

Is This Answer Correct ?    13 Yes 2 No

What is the purpose of having the concept of overloading?..

Answer / anjani kumar jha

Suppose u write a method having two parameter and name of
that method is sum..................that is

public void sum(int a, int b)
{

}
Now suppose later the requirement is modified and u have to
told now sum method should pass three parameter in subclass,
and both the parameter which is called in superclass should
be same............what u gonna do .........

So u have to write to method in subclass one with two
parameter and another with three parameter and suppose again
the parameter increased and due to which u have to write 100
method like that...........that is sucide attempt for a
developer.

So sun told dont worry use the concept of overloading....
same class name with different parameter.......no need to
write the different method........for the same task....

use same method with different parameter is called overloading.

Is This Answer Correct ?    7 Yes 3 No

What is the purpose of having the concept of overloading?..

Answer / geeta

Some times same Object should act differently in differnet
places and in different time . In that case java goes with
overloading.

Is This Answer Correct ?    5 Yes 3 No

What is the purpose of having the concept of overloading?..

Answer / sridharan

Consider if u have a string and u want to find the length
of a string, so u have
getLength(String name) method which will return the length
of the string. Also if u feels that u want to find the
length of a string from the specified position or
character. So we can have same name but with one more
parameter to specify the character position. So we will
have getLength(String name, int a)

Is This Answer Correct ?    2 Yes 1 No

What is the purpose of having the concept of overloading?..

Answer / siddhart prasad

Method overloading is used when objects are required to perform similar rasks but with different input parameters.....i think soo.....:-)......when we call a method in an object, java use to match the method name first as well as the no. and different typs of parameters to decide which one of da definitions to execute....the process is known as #static_polymorphism.

Is This Answer Correct ?    1 Yes 0 No

What is the purpose of having the concept of overloading?..

Answer / ajay kumar sharma

Overloading is actually belongs to the concept of
Polymorphism the most important feature of OOP.
And it simply means "Ability to take more than one form".

In a Progarm when a same method(having ame name, return
type,argument list) is used to perform multiple or
different tasks its called as method overloading.

Is This Answer Correct ?    3 Yes 11 No

Post New Answer

More Core Java Interview Questions

How do you declare an infinite loop?

2 Answers  


Can we have try block without catch block?

0 Answers  


When do we use hashset over treeset?

0 Answers  


What is race condition ?? (Threading concept) TCS 2 sept10

3 Answers   SparkTG, TCS,


What is the order of arraylist in java?

0 Answers  


Explain polymorphism citing an example.

0 Answers   Amazon,


How u dubugg ur project?

1 Answers   iFlex,


why java not supproting multiple inheritance?

5 Answers  


What is a layout manager?

1 Answers  


How do you implement polymorphism in our day to day life?

0 Answers   Cap Gemini,


Why map is used in java?

0 Answers  


hr interview how many minutes asking question

0 Answers  


Categories