File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes stack overflow error 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 "stack overflow error" Watch "stack overflow error" New topic
Author

stack overflow error

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
public class MyFirst {

MyFirst m = new MyFirst();

public static void main(String[] args) {
MyFirst m = new MyFirst();
}

}

why this program is not giving stack overflow error ... i am thinking it as a chaining program ...

please help .
thanks .
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
"why this program is not giving stack overflow error"

It does for me.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Not giving ...
Please help ...
Thanks .
Jay Pawar
Ranch Hand

Joined: Aug 27, 2004
Posts: 411
Originally posted by rathi ji:
Not giving ...
Please help ...
Thanks .


It does for me too . I am using j2sdk1.4.2_05. What is yours ?


Cheers,<br />Jay<br /> <br />(SCJP 1.4)<br />Heights of great men were not achieved in one day, they were toiling day and night while their companions slept.
Joyce Lee
Ranch Hand

Joined: Jul 11, 2003
Posts: 1392
[Rathi]Not giving ...
Please help ...


What did you get when executing that piece of code?

Here's the result I got in JDK1.5:



The following code will too cause a StackOverflowError:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: stack overflow error
 
Similar Threads
not leading to stack overflow error
please help me to resolve this
Class Path error Help
StackOverflowException
Two simpe methods calling each other not working as expected