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

What is a parameter example?

975


Why java doesn’t support multiple inheritances?

1040


How do you reverse sort in java?

941


Why heap memory is called heap?

1042


How static variable work in java?

1121


What are the differences between forwarding () method and sendredirect() methods?

1105


What is the function of compareto in java?

1049


Can you achieve runtime polymorphism by data members?

1143


What does provide mean construction?

1099


What is predicate in java?

1055


What does the ‘static’ keyword mean? Is it possible to override private or static method in java?

984


What is the use of a conditional inclusion statement in Java ?

1092


What is the difference between iterator and list iterator?

1030


How can the checkbox class be used to create a radio button?

1037


Explain about static nested classes in java?

1063