Search code examples
javanullablenull-coalescing-operator

Is there an equal for the c# null coalescing operator in java?


I searched a while for an equal for C# 'nullable' in java and found that one of the closest ways is to use the wrapper classes; now I want to know is there an equal for the c# null coalescing operator (??) in java? (of course except an ordinary 'if' statement)


Solution

  • Direct answer, no it doesn't exist in java