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

Explain inheritance in java?

966


Which programming language is best in future?

943


Is ++ operator thread-safe in java?

1158


When we serialize an object does the serialization mechanism saves its references too?

1004


What do you understand by the term string pool?

989


Can we serialize static variables in java?

1072


Explain the importance of throwable class and its methods?

1019


What is bigger kb or mb?

1022


How can you handle java exceptions?

1001


Can a class have multiple superclasses?

1142


What does index mean in java?

976


What are different ways of object creation in java ?

1061


How do you use equal in java?

1050


How many bytes is a unicode character?

985


What ide should I use for java?

1002