Toptube Video Search Engine

Title:#12 If else in Java

Telusko Courses: Industry Ready Java Spring Microservices Developer Live : Complete Java Developer Course : Coupon: TELUSKO20 (20% Discount) Spring Framework with Spring Boot- Live Course : Industry Ready Java Spring Developer : Complete java developer Course : Coupon Code: TELUSKO10 (10% off) Udemy Courses: Java:- Spring:- Java For Programmers:- For More Queries WhatsApp or Call on : +919008963671 website : 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 : Java:- Spring:- More Learning : Java :- Python :- Django :- JavaScript :- Node JS :- Rest Api :- Servlet :- Spring Framework :- Design Patterns in Java :- Docker :- Blockchain Tutorial :- Corda Tutorial:- Hyperledger Fabric :- NoSQL Tutorial :- Mysql Tutorial :- Data Structures using Java :- Git Tutorial :- Donation: PayPal Id : navinreddy20


Download Server 1


Download Server 2


Alternative Download :