diff --git a/core-java-modules/core-java-uuid/src/main/java/com/baeldung/uuid/UUIDPositiveLongGenerator.java b/core-java-modules/core-java-uuid/src/main/java/com/baeldung/uuid/UUIDPositiveLongGenerator.java index 7b98c05684..13b32be856 100644 --- a/core-java-modules/core-java-uuid/src/main/java/com/baeldung/uuid/UUIDPositiveLongGenerator.java +++ b/core-java-modules/core-java-uuid/src/main/java/com/baeldung/uuid/UUIDPositiveLongGenerator.java @@ -16,7 +16,7 @@ public class UUIDPositiveLongGenerator { return Math.abs(UUID.randomUUID().getMostSignificantBits()); } - public long gethashCode() { + public long getHashCode() { return Math.abs(UUID.randomUUID().toString().hashCode()); }