【单选题】分析下列代码,结论正确的是___。 Code 1: int number = 45; boolean even; if (number % 2 == 0) even = true; else even = false; Code 2: int number = 45; boolean even = (number % 2 == 0);
【单选题】分析以下代码片段,为变量even赋布尔值。 Code 1: if number % 2 == 0: even = True else: even = False Code 2: even = True if number % 2 == 0 else False Code 3: even = number % 2 == 0
【单选题】分析以下代码片段,为变量even赋布尔值。 Code 1: if number % 2 == 0: even = True else: even = False Code 2: even = True if number % 2 == 0 else False Code 3: even = number % 2 == 0