You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Learn/Jb05_Operate3.java

24 lines
580 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

public class Jb05_Operate3
{
public static void main(String[] args)
{
//比较运算符结果只能是true或false
/*
逻辑运算符用于连接boolean类型的表达式
&运算符特点运算的两边只有一个是false结果是false两边都为true结果是true
|运算特点两边有一个是true结果是true;两边都是false结果是false
^运算特点两边结果相同结果是false两边结果不同结果是true
!运算特点:非真则假,非假则真
&&运算特点:运算结果和&相同。区别左边是false时右边不参与运算
||运算特点:运算结果和|相同。区别左边是true时右边不参与运算
位运算:对二进制进行运算
*/
}
}