Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Objects involved in a cycle!

 
Alexandre Martins
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
Thanks!
[ May 26, 2004: Message edited by: Alexandre Martins ]
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just don't use the factory methods in implementing the factory methods.

 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this a definition, or a constructor?
 
Alexandre Martins
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic