The Artima Developer Community
Sponsored Link

Java Answers Forum
Constructor not being called

1 reply on 1 page. Most recent reply: Jan 29, 2003 10:08 AM by Joan Friedman

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Lar

Posts: 1
Nickname: lar
Registered: Jan, 2003

Constructor not being called Posted: Jan 29, 2003 9:52 AM
Reply to this message Reply
Advertisement
Hi,
I have a java program. In one class, I have a method that creates another class.
Buy my program stops running just before the line to create this new class.
I have a print statement before and after the line of code and it prints the statement before the call.
I also have a print statement in the very first line of the constructor of the other class, which is NOT being printed. I was thinking that it might be something to do with buffering that it wasn't printing the first line, so I also put a System.exit(1);
If I comment out the line creating the new class, the program runs.
It gives no error messages and program just freezes.
Any help would be greatly appreciated.
Thanks


Joan Friedman

Posts: 6
Nickname: joan
Registered: Jan, 2003

Re: Constructor not being called Posted: Jan 29, 2003 10:08 AM
Reply to this message Reply
Can you post the problem line of code, with a few lines before and after it?

Flat View: This topic has 1 reply on 1 page
Topic: Networking prob Previous Topic   Next Topic Topic: Recursion versus iteration

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use