Greeting ,,
please , i need illustrating to line 6 of this example why do we need to cast null ? whats the benefit ?
captured example :
1// @Nullable
2// public KeyStroke getKeyStroke(String key) {
3// KeyStroke ks = null;
4// try {
5// String s = getStringRecursive(key);
6// ks = (s == null) ? (KeyStroke) null : KeyStroke.getKeyStroke(s);
7// } catch (NoSuchElementException e) {
8// }
9// return ks;