File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes relationship between classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "relationship between classes" Watch "relationship between classes" New topic

relationship between classes

ramya ray
Ranch Hand

Joined: Aug 11, 2006
Posts: 101
Hi ,
Please guide me about the confusion of relationship between classes
question from sun epractice exam ..
class A {
class B{
private A m = new A();
1. class A maintains no relation with B

2. class b maintain relation with A.
MY QUESTION IS : Does here it is talking about inner class relation or class B has A ?

3. Is B maintain one to many relationship with A
Please describe what it mean ?
4 The relation can be described as Has-A clause.
is it talking about class b has A .
Answer is : 2 & 4 are correct statements.

If a class implements inteface so does it "IS- A" relation.
what is relation between inner class and outer class other than you can not instantiate it withut outer class instance.
deepak adlakha
Ranch Hand

Joined: Jul 27, 2001
Posts: 325
check this out..

Hope this helps
jQuery in Action, 3rd edition
subject: relationship between classes
It's not a secret anymore!