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

Explain about interthread communication and how it takes place in java?

1029


What are different types of arrays?

1016


What is preparedstatement in java?

1059


What is default switch case? Give example.

1014


v-model life cycle

2049


What is the difference between ArrayList and Vector? which one is better in Java

1147


Can an unreferenced object be referenced again?

1194


Why bytecode is called bytecode?

1221


Which programming language is most secure?

1003


What is the purpose of declaring a variable as final?

973


What is finally in Java?

1084


How are variables stored?

990


what is daemon thread and which method is used to create the daemon thread? : Java thread

979


What is the similarity between dynamic binding and linking?

1124


Is binary a low level language?

925