The following is how the ternary operator can be used to handle null pointers: String message = (str == null) ? "" : str.substring(0, 10); If ...
確定! 回上一頁