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 the is a and has a relation ship in oops concept in
java?

Answer Posted / raghava

OOOOOO!NOooooooooo.

is a relationship is (inheritence)

has a relationship is (composition or Assocation)

Example:
Has a relation

public class Address
{
String street;
String city;

.......

}

public class Person
{
String name;
Address address; //has a relationship
}

Is This Answer Correct ?    82 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a static class have a constructor java?

976


What means public static?

1033


What are the different types of java?

1054


What is the transient keyword?

2161


What are the different ways of implementing thread? Which one is more advantageous?

977


What are conditionals and its types?

1132


Can a class with private constructor be extended?

938


Why is an interface be able to extend more than one interface but a class can’t extend more than one class?

1163


When throw keyword is used?

1057


Which is better arraylist or vector?

1017


What do you understand by java virtual machine?

1186


Explain about transient variables in java?

1093


Which keyword specify that a variable is effectively final ?

983


What does .equals do in java?

1085


What does null mean in java?

1060