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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is scope & storage allocation of static, local and register variables? Explain with an example.

1053


What is backdrop?

1133


What is the difference between double and float variables in java?

1201


Can we declare the static variables and methods in an abstract class?

1037


What is the exact difference in between Unicast and Multicast object?

2192


What is the static method?

1127


How to display all the prime numbers between 1 and n (n is the number, get the input from user)

1024


What is array length?

1021


When do you get classcastexception?

1077


What are the super most classes for all the streams?

2690


What is the internal implementation of set in java?

996


Why is java multithreaded?

1046


I want to re-reach and use an object once it has been garbage collected. How it's possible?

1074


What is the use of arraylist in java?

1159


What does t in java mean?

1059