#13 If Else If in Java

  Рет қаралды 100,885

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 are discussing:
1) what is if-else-if ladder?
2) syntax of if-else-if ladder
3) example of if-else-if
#1
-- if-else-if ladder is a series of if, else if or else statements that are executed based on the boolean condition.
-- if else if ladder is used to test multiple conditions
#2
syntax of if-else-if ladder
if(condition1)
{
//block of code
}
else if(condition2){
//block of code
}
else if(condition3)
{
//block of code
}
else{
//block of code
}
Note: only one block is executed from all. If all condition is false then else part executed
#3
-- check greatest number from three number.
int x=8;
int y=7;
int z=6;
if(x y && x z)
System.out.println("x is greater");
else if(y z)
System.out.println("y is greater");
else
System.out.println("z is greater");
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

Пікірлер: 12
@ArcturusWasTaken
@ArcturusWasTaken 3 ай бұрын
Sir really has the ability to explain well ❤ , Love the course so far, switching from JavaScript to Java, Very understandable, also i'd love if sir made some community for our questions ❤❤❤
@Trunk_Tech
@Trunk_Tech Жыл бұрын
Hello sir, i would kindly request if you include assignments as we proceed with the tutorials. Thank You.
@actandrepeat
@actandrepeat Жыл бұрын
Checking if the values are equal will make the program a bit faster. If you use if (x >= y && x >= z) and all three values are the same it will return x immediately instead of going to the else-if and then finally returning the z value from the last line which obviously is the same as x since x = y = z.
@AnuragRawat01
@AnuragRawat01 11 ай бұрын
Like this if(x>=y && x>=z) system.out.printli(x); else if(y>=z) system.out.printli(y); else system.out.printli(z);
@f1rstmani624
@f1rstmani624 Жыл бұрын
U can also apply this approarc➡️ Declare max = x If (y>max) y=max If(z>max) z=max
@Uzumaki_tanjiro
@Uzumaki_tanjiro 4 ай бұрын
broo its correct but the topic is about if else if statements he just used that program as example to explain about the topic
@viratcreations867
@viratcreations867 Жыл бұрын
What happen if three values are same
@AnuragRawat01
@AnuragRawat01 11 ай бұрын
For that we have to make another logic if(x>=y && x>=z) system.out.printli(x); else if(y>=z) system.out.printli(y); else system.out.printli(z);
@TechNcookBook
@TechNcookBook 3 ай бұрын
Any reason for making these my videos sir
@user-qt7zm9rk8s
@user-qt7zm9rk8s 9 ай бұрын
its z not zee 😂
@vidyadharrao1894
@vidyadharrao1894 5 ай бұрын
play your comment
@nt0310
@nt0310 3 ай бұрын
Different places have different pronunciation hope you know that
#14 Ternary Operator in Java
4:39
Telusko
Рет қаралды 126 М.
If Else Statement In Java Tutorial #17
7:39
Alex Lee
Рет қаралды 321 М.
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 13 МЛН
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 101 МЛН
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 26 МЛН
#12 If else in Java
12:59
Telusko
Рет қаралды 133 М.
Checked vs. Unchecked Exceptions in Java Tutorial - What's The Difference?
10:14
How I would learn to code (If I could start over)
9:16
Jason Goodison
Рет қаралды 4,7 МЛН
Fastest Way to Learn ANY Programming Language: 80-20 rule
8:24
Sahil & Sarra
Рет қаралды 807 М.
#51 This and Super Method in Java
12:11
Telusko
Рет қаралды 96 М.
Java if statements 🚧【6 minutes】
6:12
Bro Code
Рет қаралды 139 М.
#17 While Loop in Java
12:28
Telusko
Рет қаралды 115 М.
Static vs Non-Static Variables and Methods In Java - Full Simple Tutorial
11:29
#10 Relational Operators in Java
8:05
Telusko
Рет қаралды 129 М.
Как противодействовать FPV дронам
44:34
Стратег Диванного Легиона
Рет қаралды 88 М.
Rate This Smartphone Cooler Set-up ⭐
0:10
Shakeuptech
Рет қаралды 6 МЛН
Новые iPhone 16 и 16 Pro Max
0:42
Romancev768
Рет қаралды 2,4 МЛН
Xiaomi SU-7 Max 2024 - Самый быстрый мобильник
32:11
Клубный сервис
Рет қаралды 549 М.
КРАХ WINDOWS 19 ИЮЛЯ 2024 | ОБЪЯСНЯЕМ
10:04