a!=null ? a: 123
当 a 不为空时,返回 123,
可简写为 a ?: 123(a 不为null 不为 '','0',0 时,返回它本身,否则返回123...)
posted on 2018-06-19 10:05 正义的伙伴! 阅读(181) 评论(0) 编辑 收藏 举报