Posts

Showing posts with the label Relational and Logical Operators

Java Tutorial 11 --- "Relational and Logical Operators"

Image
 Java Tutorial 11 --- "Relational and Logical Operators" DOC ---  CODE ---  package com.company ; public class Tut11 { public static void main (String[] args) { // Relational and Logical Operators System. out .println( "For Logical AND....." ) ; Boolean a = true; Boolean b = true; Boolean c = true; if (a && b && c){ System. out .println( "Y" ) ; } else { System. out .println( "N" ) ; } System. out .println( "For Logical OR....." ) ; Boolean d = true; Boolean e = false; Boolean f = true; if (a && b || c){ System. out .println( "Y" ) ; } else { System. out .println( "N" ) ; } System. out .println( "For logical NOT...." ) ; System. out .println( "Not A is - " + !a) ; Sy...