Mastering Java and Spring Boot - Live Course : https://bit.ly/TeluskoJavaLive
For More Queries WhatsApp or Call on : +919008963671

In this lecture we are discussing:
1)What is conditional statements?
2)types of conditional statements
a) if-else
b) switch (next lecture)
c) ternary operator (next lecture)
d) nested if-else (next lecture)
e) if-else-if ladder (next lecture)

3)syntax of if-else
4)example on if-else condition

#1
-- conditional statement is a statement that can be true or false.
-- suppose if ask student is pass. (answer yes or no)
-- this type of statement of statement is conditional statement.

#2
In this part we are only discussing about if-else and
in next lecture we are discussing if-else-if ladder, ternary operator and switch statement.

#3
syntax of if-else

-- condition is either true or false after evaluation
-- remember like c and c++, we cannot use number directly as condition of if-else
-- if(5) --- not allowed in java
-- you get Type mismatch: cannot convert from int to boolean
if(condition)
{
//code
//either this part execute
}

else
{
//code
//or this part execute
}

#4
example:
if want to check a given number is even or odd then;
int num=13;
if(num%2==0)
System.out.println("Even"); //here we not use braces for single statement {}

else
System.out.println("Odd"); // here we not use braces {}

Note: for single statement braces is not required but for multiple statement it is required.

Github repo : https://github.com/navinreddy20/Javacode.git

Java:- https://bit.ly/JavaUdemyTelusko
Spring:- https://bit.ly/SpringUdemyTelusko

More Learning :

Java :- https://bit.ly/3x6rr0N
Python :- https://bit.ly/3GRc7JX
Django :- https://bit.ly/3MmoJK6

JavaScript :- https://bit.ly/3tiAlHo
Node JS :- https://bit.ly/3GT4liq

Rest Api :-https://bit.ly/3MjhZwt
Servlet :- https://bit.ly/3Q7eA7k
Spring Framework :- https://bit.ly/3xi7buh
Design Patterns in Java :- https://bit.ly/3MocXiq
Docker :- https://bit.ly/3xjWzLA

Blockchain Tutorial :- https://bit.ly/3NSbOkc
Corda Tutorial:- https://bit.ly/3thbUKa
Hyperledger Fabric :- https://bit.ly/38RZCRB

NoSQL Tutorial :- https://bit.ly/3aJpRuc
Mysql Tutorial :- https://bit.ly/3thpr4L

Data Structures using Java :- https://bit.ly/3MuJa7S
Git Tutorial :- https://bit.ly/3NXyCPu

Donation:
PayPal Id : navinreddy20
https://www.telusko.com