Code example for AtomicInteger

Methods: get, getAndIncrement

0
 
	final AtomicInteger i = new AtomicInteger(0);
 
	@Override 
	public void run() { 
		i.getAndIncrement();
		System.out.println("void methode -> " + i.get());
	} 
 
	/** 
	 * @param args 
	 * @throws IOException 
	 */ 
	public static void main(String[] args) throws Exception {
 
		// // SERVER 
 
		ConnectionManager cm = new ConnectionManager(true);
 
		ServerApp s = new ServerApp();
		cm.openServer(1337);