else和离它最近的if匹配 补充:以上代码11到14行的代码不用{}括,是因为if else合起来是一条语句,因为只执行一句。 if书写形式的对比 1.if(condition) { return x; } return y; 2.if(condition) { return x; } else { return y; } 这两种书写形式所要表达的内容是一样的 补充: 结果是hehe加光标闪烁