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

Is java call by value?

1098


What is meant by data hiding/encapsulation?

1106


What is the primitive type short?

1019


What are the different types of sorting in java?

980


How do you define a method?

980


What is class variable java?

1013


What is the purpose of interface?

1007


Explain about java sdk?

1041


Why is multithreading important?

949


What is a lock or purpose of locks in java?

1030


Why string is called as immutable?

956


What are multiple inheritances? Is it supported by java?

953


How do you implement singleton class?

994


what happens when a thread cannot acquire a lock on an object? : Java thread

1050


What is identifier in java?

1117