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 is t type java?
How to print nodes of a Binary tree?
Explain about abstract classes in java?
Why do we need hashset in java?
How will you calculate the depth of a binary tree if the tree contains 15 nodes?
What are singleton services?
Why do we need data structure in java?
What is the difference between normal report & matrix report?
Does variable declaration allocate memory?
Explain methods specific to list interface?
Does garbage collection occur in permanent generation space in jvm?
Is minecraft 1.15 out?
Why do we create public static method in java?
In how many ways we can create threads in java?
How do I find and replace in word?