短路現象
&&有短路現象
||沒有短路現象
[java]
package com
public class Test
public static void main(String[] args) {
boolean b
System
boolean b
}
static boolean test
System
System
return value <
}
static boolean test
System
System
return value <
}
static boolean test
System
System
return value <
}
}
輸出結果
[java]
test
result:true
test
result:false
test
result:false
test
result:true
test
result:true
From:http://tw.wingwit.com/Article/program/Java/hx/201311/26187.html