Last active
October 7, 2021 12:00
-
-
Save nbness2/0b61a25592254ddde009a31266401108 to your computer and use it in GitHub Desktop.
Dubious String Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
public final class MaybeNull { | |
public static String maybeNullString() { | |
boolean isStringNull = new Random().nextBoolean(); | |
return isStringNull ? null : "not null"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment