Program for Logical Operators.
0
03 Java Operators.
Program for Logical Operators:
Program for Logical Operators:
//LogicalOperatorsDemo.java
public class LogicalOperatorsDemo
{
public static void main(String args[])
{
boolean x = true;
boolean y = false;
System.out.println("x & y : "+(x & y));
System.out.println("x && y : "+(x && y));
System.out.println("x | y : "+(x | y));
System.out.println("x || y: "+(x || y));
System.out.println("x ^ y : "+(x ^ y));
System.out.println("!x : "+(!x));
}
}
0 comments: