Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.concurrent.atomic.AtomicLong;

public class Main {
    public static void main(String[] argv) {
        AtomicLong nextId = new AtomicLong();

        System.out.println(nextId.getAndIncrement());
        System.out.println(nextId.get());
    }
}