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 the meaning of variables in research?

974


If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?

981


What are autoboxing and unboxing? When does it occur?

890


What is the use of StringTokenizer class?

1013


What is public static?

976


What is a map? What are the implementations of map?

1032


What is the difference between pass by reference and pass by pointer?

994


What is number data type in java?

939


What are "class access modifiers" in Java?

1052


What are the advantages of defining packages in java?

920


What is treeset in java?

938


Explain importance of inheritance in java?

963


Explain differences between collection api and stream api?

1084


Does java list allow null?

920


What is the difference between super class & sub class?

1069