00:01 Logical operators in Java allow you to combine multiple conditions 01:30 Logical operators in Java allow computers to make decisions based on multiple conditions. 02:57 Logical operators in Java 04:22 Logical Operators in Java: And, Or, Not 05:46 Logical operators in Java allow for short circuiting, saving time in the evaluation. 07:08 Implementing logical operators in Java 08:27 Logical AND (&&) operator returns true only if both conditions are true 09:55 Logical operators in Java allow for combining multiple conditions
@1:38 You may envision "AND" operator as two switches connected in series, and "OR" operator as two switches connected in parallel. If "AND" is used then both the switches must be ON to produce an active output. If "OR" operator is used then one, or more, of the switches need to be ON to produce an active output. That was from the basic electric circuit perspective. The inverting logic "NOT" is like using an inverting BJT transistor: common Emitter, with input at the Base and output at the Collector (for electrical engineers).
sir in the previous videos you mentioned only class demo..... but here you have mentioned public class demo what is the difference between class and public class sir
if we do not specify any modifier then JVM considers it as default access modifier so public class is public with access modifier public class means default with default modifier;
In java,we are having modifiers topic separately.we are having 2 modifiers one is access modifiers.other one is non-access modifiers.In access modifiers,we are having public,default,protected,private.Access modifier means controls the access level.for classes we can use public or default.the public keyword is an access modifier meaning that is used to set the access level for classes,methods,attribute and constructor.public class is accessible by any other classes.for default,this is used when you dont specify a modifier.the class is only accessible by classess in the same package.
even if my condition is true and my code is written right, my output is always giving me false. Why? i tried most of the conditions but the output is always FALSE.
class Hello { public static void main(String[] args) { float a = 5.6f; float b = 5.5f; int x = 10; int y = 11; boolean c = true; System.out.println(!(ay); //System.out.println(x