Click here to watch in Youtube :
https://www.youtube.com/watch?v=WlrJ4ywU6_s&list=UUhwKlOVR041tngjerWxVccw
Click the below Image to Enlarge
Java Tutorial : Java Conditional-And Operator |
Java Tutorial : Java Conditional-And Operator |
class ConditionalAndOperatorDemo { public static void main(String[] args) { int value1 = 1; int value2 = 2; /* * true && true is true * * 1 && 1 is 1 */ System.out.println((value1 == 1) && (value2 == 2)); /* * true && false is false * * 1 && 0 is 0 */ System.out.println((value1 == 1) && (value2 == 90)); /* * false && true is false * * 0 && 1 is 0 */ System.out.println((value1 == 20) && (value2 == 2)); /* * false && false is false * * 0 && 0 is 0 */ System.out.println((value1 == 100) && (value2 == 90)); } }
true false false false
https://sites.google.com/site/javaee4321/java/OperatorsDemoConditionalAndApp.zip?attredirects=0&d=1
See also:
No comments:
Post a Comment