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 catch more than one exception in single catch block?

1051


How will you invoke any external process in java?

1122


What is command line argument in java?

1157


In Java list the methods that can be overridden?

1017


Explain reverse a linked list recursive java solution?

992


What is an object's lock and which object's have locks in java programming?

1054


What are advantages of exception handling in java?

1026


Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.

2743


Is set thread safe java?

932


What is the difference between hashmap and hashtable? What is an interface?

1170


How do you make an arraylist empty in java?

935


What is the difference between the prefix and postfix forms of the ++ operator?

1021


What is the use of flag?

1094


What are format specifiers in java?

1069


What is the purpose of the file class in java programming?

1029