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 method overridding method overloding with examples?

Answer Posted / esha prasad

Overriding:: It's not any two classes will do to study this
scnario, because overriding will come in a scenario
involving parent child relationship.



public class Parent{

public void sum(int a, int b)
{
System.out.println(a+b);
}
class Child extends Parent
{


public void sum(int a, int b)
{
System.out.println("Sum of the integers = "+a+b);
}
}

}

class MainClass
{
public static void main(String[] args) {


}

}

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where can I get help with struts?

966


How we can install struts?

942


What does validation interceptor?

955


How can we integrate log4j in Struts2 application?

993


What are the applications of struts?

924


Who wrote struts?

932


What is the difference between struts and spring? Explain

883


How to use dispatchaction?

1014


What is life cycle of an interceptor?

1028


Which tag is used to declare constants in struts xml?

919


How can we upload files in Struts2 application?

998


How is the action mapping specified?

926


How can we group related actions in one group in Struts?

938


Explain the components of struts?

931


What are the ways in which duplicate form submission can occur?

903