Code example for AtomicInteger

 * @author Derek Smith 
public class NamedThreadFactory implements ThreadFactory
    protected final String id;    
    protected final AtomicInteger n = new AtomicInteger(1);
     * Creates a new ThreadFactory with a value that can be used 
     * to retrieve itself later. 
     * @param id The name of the the thread factory; 
    public NamedThreadFactory(String id)
    	super(); = id;
    /* (non-Javadoc) 
Contextual code suggestions in your IDE  Get Codota for Java