什么是导入java.util.UUID用于?

时间:2010-12-31 19:06:33

标签: java import unique uuid reasoning

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;
        }
    }

1 个答案:

答案 0 :(得分:8)

它可以帮助您解析/生成Universally unique identifier