4
Java Thread ขยะเก็บได้หรือไม่
คำถามนี้ถูกโพสต์ในบางไซต์ ฉันไม่พบคำตอบที่ถูกต้องดังนั้นฉันจึงโพสต์ที่นี่อีกครั้ง public class TestThread { public static void main(String[] s) { // anonymous class extends Thread Thread t = new Thread() { public void run() { // infinite loop while (true) { try { Thread.sleep(1000); } catch (InterruptedException e) { } // as long as this line printed out, …