1 19 20 package org.netbeans.api.debugger.jpda.testapps; 21 22 27 public class ThreadBreakpointApp { 28 29 public static void main(String [] args) { 30 ThreadBreakpointApp sa = new ThreadBreakpointApp(); 31 sa.threads(); 32 } 33 34 private void threads() { 35 ThreadGroup tgrp = new ThreadGroup ("testgroup"); 36 new SampleThread(tgrp, "test-1").start(); 37 new SampleThread(tgrp, "test-2").start(); 38 new SampleThread(tgrp, "test-3").start(); 39 new SampleThread(tgrp, "test-4").start(); 40 new SampleThread(tgrp, "test-5").start(); 41 } 42 43 44 private class SampleThread extends Thread { 45 46 public SampleThread(ThreadGroup group, String name) { 47 super(group, name); 48 } 49 50 public void run() { 51 try { 52 Thread.sleep(200); 53 } catch (InterruptedException e) { 54 } 55 } 56 } 57 } 58 | Popular Tags |