This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

StackOverflowError

 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Exception in thread "main" java.lang.StackOverflowError
at Test.<init>(Test.java:3)
at Test.<init>(Test.java:3)
at Test.<init>(Test.java:3)
at Test.<init>(Test.java:3)
at Test.<init>(Test.java:3)
at Test.<init>(Test.java:3)
at Test.<init>(Test.java:3)
at Test.<init>(Test.java:3)

I don't understand reason.
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12022
25
Chrome Java Linux
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what happens when you do this:

Test obj=new Test();

you make a Test object. What does it hold? Two Test objects. Each of those has to hold two Test objects, each of which have to hold two Test objects...

and eventually you run out of stack space.
 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic