This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Java in General and the fly likes Objects involved in a cycle! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Objects involved in a cycle!" Watch "Objects involved in a cycle!" New topic

Objects involved in a cycle!

Alexandre Martins

Joined: May 21, 2002
Posts: 9
Anyone could help me please?
I have 2 objects involved in a cycle.

I did a factory in order to build these objects, as follows:

How can i build one of these objects without have an StackOverflow error?
[ May 26, 2004: Message edited by: Alexandre Martins ]

Alexandre Martins Nunes<br />Rio de Janeiro - Brazil
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24189

Just don't use the factory methods in implementing the factory methods.

[Jess in Action][AskingGoodQuestions]
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Is this a definition, or a constructor?
Alexandre Martins

Joined: May 21, 2002
Posts: 9
ok, thanks!
I agree. Here's the link:
subject: Objects involved in a cycle!
It's not a secret anymore!