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
Can a static class have a constructor java?
What means public static?
What are the different types of java?
What is the transient keyword?
What are the different ways of implementing thread? Which one is more advantageous?
What are conditionals and its types?
Can a class with private constructor be extended?
Why is an interface be able to extend more than one interface but a class can’t extend more than one class?
When throw keyword is used?
Which is better arraylist or vector?
What do you understand by java virtual machine?
Explain about transient variables in java?
Which keyword specify that a variable is effectively final ?
What does .equals do in java?
What does null mean in java?