Skip to content

Instantly share code, notes, and snippets.

@Wuvist
Last active December 17, 2020 14:08
Show Gist options
  • Save Wuvist/22b70679729c4754cb52f219b14804f6 to your computer and use it in GitHub Desktop.
Save Wuvist/22b70679729c4754cb52f219b14804f6 to your computer and use it in GitHub Desktop.
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