Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

IdGenerator In Java

DZone's Guide to

IdGenerator In Java

·
Free Resource
// IdGenerator


public class IdGenerator {
	
	private long maxId; 
	
	public IdGenerator(long start) {
		maxId = start;
	}
	
	public long getNextId () {
		return ++maxId;
	}

} // IdGenerator
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}