What is import java.util.UUID used for?

theJava picture theJava · Dec 31, 2010 · Viewed 9.1k times · Source
import java.util.UUID
public class Person implements Serializable {

        private UUID uuid;

        public Person() {
            uuid = UUID.fromString("3856c3da-ea56-4717-9f58-85f6c5f560a5");
        }

        public UUID getUuid() {
            return uuid;
        }
    }

Answer

ismail picture ismail · Dec 31, 2010

It helps you parse/generate a Universally unique identifier .