Created
March 15, 2021 09:18
-
-
Save coolsasindu/153fcdcc788347d6dd1aab15f418b41c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Boolean_and { | |
public static void main(String args[]){ | |
int a = 5 ; | |
int b = 4 ; | |
if( a & b ){ | |
//true | |
System.out.println("yes"); | |
}else{ | |
//false | |
System.out.println("No"); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Boolean_com { | |
public static void main(String args[]){ | |
int a = 5 ; | |
int b = 4 ; | |
if( a ~ b ){ | |
//true | |
System.out.println("yes"); | |
}else{ | |
//false | |
System.out.println("No"); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Boolean_or { | |
public static void main(String args[]){ | |
int a = 5 ; | |
int b = 4 ; | |
if( a | b ){ | |
//true | |
System.out.println("yes"); | |
}else{ | |
//false | |
System.out.println("No"); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Boolean_xor { | |
public static void main(String args[]){ | |
int a = 5 ; | |
int b = 4 ; | |
if( a & b ){ | |
//true | |
System.out.println("yes"); | |
}else{ | |
//false | |
System.out.println("No"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment