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

Is it possible to do method overloading and overriding at a
time

Answer Posted / sathishkumar.m

class A
{
int c;
void add()
{
System.out.println("hai");
}
void add(int b)
{
c=b;
System.out.println("value of b:"+c);
}
}
class B
{
int e;
void add(int d)
{
System.out.println("value of d:"+e);
}
}
class Demo
{
public static void main(String aa[])
{
A o1=new B();
o1.add();
}
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how we can use debug in myeclipse 6.0 in order solve the problems that exist in our program when there are 900 to 1000 pages in a web application

2094


What is the use of http-tunneling in rmi?

1003


Where is the find and replace?

941


What is private public protected in java?

989


What is return null in java?

904


What is the use of runnable interface?

1087


What are the skills required for core java?

950


Can I learn java in 3 months?

962


What are triggers in DB? Explain their types. How do they work?

1036


what is bmg file and how to create that files?what will it contailn?

2299


You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain

929


What does it mean to flush a file?

1008


what is heap memory?

1039


Why we override equals() method?

982


What is == mean?

934