Last active
December 17, 2020 14:08
-
-
Save Wuvist/22b70679729c4754cb52f219b14804f6 to your computer and use it in GitHub Desktop.
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
class HelloWorld { | |
public static String getString(String key, String def) { | |
String cs = null; | |
Boolean containsKey = true; | |
return cs != null || containsKey ? cs == null ? null : cs.toString() : def; | |
} | |
public static String getString2(String key, String def) { | |
Boolean containsKey = true; | |
if (!containsKey) { | |
return def; | |
} | |
String cs = null; | |
return cs == null ? null : cs.toString(); | |
} | |
public static void main(String[] args) { | |
System.out.println(getString("Hello", "World!")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment