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...

explain about method overloading and method overriding with
difficult examples

Answer Posted / mayank sharma

Clas A
{
Virtual void hi(int a)
{
}
}

Class B:A
{
public overrid void hi(int a)
{

}
}

Overloading simply involves having a method with the same
name within the class.

Example for Over loading

Class A
{
class a()

{

}
class a(int a)
{
}
}

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between abstraction and encapsulation.

921


Why main() method is public, static and void in java ?

1029


What is java util?

973


What is a parent class in java?

957


Can you extend singleton class?

1034


Why is java called the platform independent programming language?

949


what is the use of bean managed and container managed with example?

1925


What are the advantages of arraylist over arrays?

1037


Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?

968


Can you inherit a constructor java?

1019


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

1039


What is the scope or life time of instance variables?

1056


Can we assign null to double in java?

961


Can a class be declared as static?

1107


Which keyword specify that a variable is effectively final ?

933