#11 Logical Operators in Java

  Рет қаралды 125,139

Telusko

Telusko

Жыл бұрын

Check out our courses:
Spring and Microservices Weekend Live Batch : bit.ly/spring-live-weekend
Coupon: TELUSKO10 (10% Discount)
Master Java Spring Development : bit.ly/java-spring-cloud
Udemy Courses:
Java:- bit.ly/JavaUdemyTelusko
Spring:- bit.ly/SpringUdemyTelusko
Java For Programmers:- bit.ly/javaProgrammers
For More Queries WhatsApp or Call on : +919008963671
website : courses.telusko.com/
In this lecture we will learn:
- What are relational operators?
- AND operator
- OR operator
- NOT operator
If we need to combine the result of two or more relational operators, then we use logical operators.
- We use logical operator in between two or more results of relational operators.
- AND operator (&&), OR operator (||) and Not operator (!) are logical operators.
1) In case of AND Operator:
- If both are true - true
- If one is true and other is false - false
- If one is false and other is true - false
- If both are false - false
* If first condition is false then it will not check for the another one and it will increase the execution time.
Thus, because of its less time it is known as short- circuit.
2) In case of OR Operator:
- If both are true - true
- If one is true and other is false - true
- If one is false and other is true - true
- If both are false - false
* If first condition is true then it will not check for the another one and it will increase the execution time.
Thus, because of its less time it is known as short- circuit.
3) In case of Not Operator:
- It is basically used to reverse the things.
It means if result is false, it will do true.
If the result is true, it will do false.
* Not operator just do the opposite.
- We can use as much logical operators as we want in between the relational operations.
Github repo : github.com/navinreddy20/Javac...
Java:- bit.ly/JavaUdemyTelusko
Spring:- bit.ly/SpringUdemyTelusko
More Learning :
Java :- bit.ly/3x6rr0N
Python :- bit.ly/3GRc7JX
Django :- bit.ly/3MmoJK6
JavaScript :- bit.ly/3tiAlHo
Node JS :- bit.ly/3GT4liq
Rest Api :-bit.ly/3MjhZwt
Servlet :- bit.ly/3Q7eA7k
Spring Framework :- bit.ly/3xi7buh
Design Patterns in Java :- bit.ly/3MocXiq
Docker :- bit.ly/3xjWzLA
Blockchain Tutorial :- bit.ly/3NSbOkc
Corda Tutorial:- bit.ly/3thbUKa
Hyperledger Fabric :- bit.ly/38RZCRB
NoSQL Tutorial :- bit.ly/3aJpRuc
Mysql Tutorial :- bit.ly/3thpr4L
Data Structures using Java :- bit.ly/3MuJa7S
Git Tutorial :- bit.ly/3NXyCPu
Donation:
PayPal Id : navinreddy20
www.telusko.com

Пікірлер: 17
@studywithshallusalaia2987
@studywithshallusalaia2987 8 ай бұрын
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
@pankajmishra8170
@pankajmishra8170 Жыл бұрын
Learned same thing in phython..thanks bro
@fifaham
@fifaham 10 ай бұрын
@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).
@kurdotv769
@kurdotv769 10 ай бұрын
i love this! should help people to visualise it even better if it wasnt clear yet!
@user-zt5lt4vb5x
@user-zt5lt4vb5x 4 ай бұрын
Your explained it was very good sir thank you sir
@mansikalyankar9834
@mansikalyankar9834 6 ай бұрын
You explained it really very well🥹😄
@rutulkarbhari4963
@rutulkarbhari4963 11 ай бұрын
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.
@ankitsrivastav273
@ankitsrivastav273 3 ай бұрын
I had study AND OR NOT gate operation in class 12 phy chapter - semiconductor and logic gates😊
@mc_6737
@mc_6737 6 ай бұрын
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
@DHHcovers
@DHHcovers 11 ай бұрын
9.59 me and Phil condition false for bhi true aya
@simonason9342
@simonason9342 9 ай бұрын
What is the diffrence between "public class" and just "class"?
@user-ld7lg6ch2y
@user-ld7lg6ch2y 8 ай бұрын
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;
@mannepallibalaji8786
@mannepallibalaji8786 5 ай бұрын
class mean it is a default class Which cannot be accessed in other classes Whereas public class can be accessed in any class of the package....
@Xtreme_Gamer01
@Xtreme_Gamer01 Ай бұрын
​@@user-ld7lg6ch2y thnx❤❤
@Actiontitanium
@Actiontitanium Жыл бұрын
genuine gajini
@Mahesh-cw4ix
@Mahesh-cw4ix Жыл бұрын
there is mistake in that and false false make false not true
@praveenreddyperam8482
@praveenreddyperam8482 Жыл бұрын
it is correct only no in given descruption
#12 If else in Java
12:59
Telusko
Рет қаралды 133 М.
#9 Arithmetic Operators in Java
10:16
Telusko
Рет қаралды 164 М.
Викторина от МАМЫ 🆘 | WICSUR #shorts
00:58
Бискас
Рет қаралды 5 МЛН
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 45 МЛН
小蚂蚁被感动了!火影忍者 #佐助 #家庭
00:54
火影忍者一家
Рет қаралды 32 МЛН
Fastest Way to Learn ANY Programming Language: 80-20 rule
8:24
Sahil & Sarra
Рет қаралды 807 М.
#23 JDK JRE JVM in Java
5:22
Telusko
Рет қаралды 223 М.
#10 Relational Operators in Java
8:05
Telusko
Рет қаралды 129 М.
Bitwise Operators and WHY we use them
8:41
Alex Hyett
Рет қаралды 69 М.
#8 Type Conversion in Java
12:33
Telusko
Рет қаралды 247 М.
Create Rock Paper Scissors in Java in 10 Minutes
10:24
Coding with John
Рет қаралды 110 М.
Array vs. ArrayList in Java Tutorial - What's The Difference?
17:36
Coding with John
Рет қаралды 510 М.
#26 Stack And Heap in Java
12:37
Telusko
Рет қаралды 221 М.
Bluetooth connected successfully 💯💯
0:16
Blue ice Comedy
Рет қаралды 1,6 МЛН
low battery 🪫
0:10
dednahype
Рет қаралды 1,7 МЛН
КРАХ WINDOWS 19 ИЮЛЯ 2024 | ОБЪЯСНЯЕМ
10:04