阅读背景:

Java:在构造函数中启动一个新线程。

来源:互联网 

Why is starting a new thread in a constructor frowned upon in Java (or anywhere, for that matter). I'm getting warnings from Netbeans for doing so, but it isn't giving me any refactoring suggestions. I'm writing a client/server Swing application, and the thread I'm starting is in the server's JFrame constructor, in order to continuously listen for client datagrams.Why is starting a new thread in a constructor f




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: