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 are latest features introduced with java 8?

1012


Explain the purpose of garbage collection in Java?

973


How to create packages in java?

893


What is the purpose of javac exe?

1030


What is the use of hashmap in java?

1027


What about main thread in java?

1061


Explain 5 features introduced in jdk 1.7?

969


Why is a singleton bad?

912


If system.exit (0); is written at the end of the try block, will the finally block still execute?

1040


Why strings in java are called as immutable?

948


What is immutable class in java?

892


What are exceptions

1037


What is type conversion in java?

981


What is size () in java?

1037


What is merge sort in java?

917