a^b:叫逻辑异或,当a和b不同时,则结果为tue,否则为false
public class operator { public static void main(String[] args) { boolean b = (10 > 1) ^ (3 > 5); System.out.println(b); // true } }
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/232949.html原文链接:https://javaforall.net