多选题 When the void keyword is used, which of the following statements are true? (Choose all that apply.) A. A return statement with a value following it must be used. B. A return statement with a value following it can optionally be used. C. A return statement with a value following it should never be used. D. A return statement by itself must be used. E. A return statement by itself can optionally be used. F. A return statement by itself should never be used. G. A return statement must be omitted. H. A return statement can optionally be omitted. I. A return statement should never be omitted.
【正确答案】 C、E、H
【答案解析】当使用void时,表示方法没有返回数据。C正确,因为返回任何数据都是无效的。E正确,因为自己选择性地使用return是有效的。H正确,因为return语句也可以选择性地忽略。A、B、D、F、G和I不正确。A和B不正确,因为void关键字意味着你不能返回值。D、F、G和I不正确,因为当使用void时,return语句是可选的。