André Vale André Vale - 8 months ago 25
Java Question

C# Nullable<T> equivalent in Java

Is there a C#

equivalent in Java?

If not, how should I define a field in a class that is able to assume a


Well any field of a reference type can be null. If you need something like a nullable int (int? in C#), then just use Integer (docs) in Java. Of course there are also types like that for double etc.