문제

I am porting some C# code to the Android platform. The code makes heavy use of nullable GUIDs. I understand they don't exist in Java, so what would be the best way to implement this feature? I am thinking of just using an "empty" GUID (00000000-0000-0000-0000-000000000000) to represent a null value.

도움이 되었습니까?

해결책

java.util.UUID is a class in Java, which means a reference to this type can have the value null. The C# type that can't be represented in Java is a non-nullable UUID.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top