This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "relationship between classes" Watch "relationship between classes" New topic
Author

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();
}
}
options:
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..

http://www.javaranch.com/campfire/StoryInner.jsp

Hope this helps
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: relationship between classes
 
Similar Threads
Nested Classes
Inner class Vs Outer Class
Accessibility of private methods in inner classes
Jaworski- local inner class
Inner class question