stackoverflow

This might be a very basic question but still I am not able to figure out why is the foll code giving stackoverflow exception in main??[code]
public class HelloWorld{
public static void main(String []args)
{
System.out.println("Hello World");
Animal c = new Animal();
}
}
class Animal
{
Animal e = new Animal();
}







[/code]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories