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
What are thread groups?
What does the “static” keyword mean?
What is anonymous inner class?
How do you replace a string in java?
What is keyset in java?
How can we make sure main() is the last thread to finish in java program?
Name few java 8 annotations ?
Where is java located?
What are the different ways of implementing thread? Which one is more advantageous?
Explain super keyword in java.
What is double in java?
EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.
How many decimal places is a double?
Is null a value?
What is object data type?