package Example1;
public class LogicalOperator {
public static void main(String[] args) {
// TODO Auto-generated method stub
if(true && true){
System.out.println("the value is true");
}
if(false || true){
System.out.println("the value is false");
}
if(!(false)){
System.out.println("the value is true");
}
if(true ^ false){
System.out.println("the value is false");
}
}
}
output:
the value is truethe value is false
the value is true
the value is false
>>>Ternary
------------------------------------------------------------------------------------------------------------
No comments:
Post a Comment