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 difference between method overloading & method
overridding with example?

Answer Posted / rana.ankur

overloading:
class A
{
Num(int a)
{
System.out.println("a: " + a);

}
Num(int a,int b)//overloading
{
System.out.println("a and b: " + a + " " + b);

}
CLass Overloading
{
public satic void main(Stinr ar[])
}
A a=new A()
a.Num(12);
a.Num(12,12);
}
}//thanks

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we have two main methods in a java class?

989


What is meant by tab pans?

1130


Can a private method be declared as static?

965


How many ways can we create the string object?

958


Explain about map interface in java?

943


What is the difference between java applets and applications?

1095


How do you create a reference in java?

913


What is the core java?

908


what is anonymous class in java?

975


State the significance of public, private, protected class?

1028


What is difference between identifier and variable?

996


Explain java coding standards for variables ?

1108


Why runnable interface is used in java?

1053


What are parsers? Dom vs sax parser.

983


How can we achieve thread safety in java?

1084