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

relationship b/n classes and instances

william kane
Ranch Hand

Joined: Nov 21, 2000
Posts: 260
Is there a difference b/n the relationship b/n classes and the relationship b/n objects that are instances of those classes
Are there any resources where is i can more info on the same?

Help me!Help you!!!
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1868
Classes basically share a structural relationship which can be created using class diagrams. This is clearly specifed at compile time itself.
However Objects mostly share a behavioural relationship. This can be shown using the Object diagrams. Thus i can have two Objects who do not know each other at the compile time reference each other at runtime.

william kane
Ranch Hand

Joined: Nov 21, 2000
Posts: 260
thanks for that reply .What i wanna know how will this relationship difference have a say at the time of design does this aspect need a consideration at all or not?
Sean MacLean
Ranch Hand

Joined: Nov 07, 2000
Posts: 621
There are certainly design pattern issues, but I think you can boil it down to uninstantiated classes that offer static (i.e. utility functionality) methods or 'client' specific instances that contain unique data in every instance. In the design phase you won't have to specify how the class is used (really) except for qualifying the methods with static or not. I know this isn't much to go on but perhaps it will seed further discussion.
I agree. Here's the link:
subject: relationship b/n classes and instances
It's not a secret anymore!