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
Is java call by value?
What is meant by data hiding/encapsulation?
What is the primitive type short?
What are the different types of sorting in java?
How do you define a method?
What is class variable java?
What is the purpose of interface?
Explain about java sdk?
Why is multithreading important?
What is a lock or purpose of locks in java?
Why string is called as immutable?
What are multiple inheritances? Is it supported by java?
How do you implement singleton class?
what happens when a thread cannot acquire a lock on an object? : Java thread
What is identifier in java?