5.2 If Else in Java Tutorial Part 8 | Lecture

  Рет қаралды 154,733

Telusko

Telusko

Күн бұрын

Пікірлер: 27
@SmartProgramming
@SmartProgramming 6 жыл бұрын
nice one sir, already know this concept but learned few more, thanks 🙂🙂
@deivasigamanimurugan4892
@deivasigamanimurugan4892 7 жыл бұрын
Am from chennai working in a Private company Really much appreciated for your way of explanation , Am going to Selenium Java class they teach me core java and above concept something i can understand, But am watching this video i completely undersood the Conditional statements concept. Thanks :) :) :) :) :) a lot for your valuable teaching.
@kunalalshi7770
@kunalalshi7770 9 жыл бұрын
Very nice video. Just 1 correction - at 6:07 it should be "a b &&" && is AND operation. I know this was unintentional error, like a typo, but just adding a comment if somebody gets confused by this.
@adharsh200
@adharsh200 6 жыл бұрын
Hi Naveen, the second condition you have entered is incorrect. That should be b>a && b>c.
@IndieTechHindi
@IndieTechHindi 4 жыл бұрын
exaclty. because in the first statement any one condition can be false and still the whole statement gets false. So we still need to check if b>a.
@jithendrabaswareddy2113
@jithendrabaswareddy2113 8 жыл бұрын
In AND operation if the result has to be true only when both A and B are True, So in the if statement we are not sure if either of the one a>b and a>c are true in that case in the else if statement shouldn't we check for both b>c && b>a ??
@screwedidiot937
@screwedidiot937 8 жыл бұрын
You are right. Even i was confused.
@prathameshdeshmukh6131
@prathameshdeshmukh6131 7 жыл бұрын
Hello sir.... i wanted to ask that if the first condition in the if statement... ie. a>b is true but the a>c is not.. then the statement won't work.. but how does it confirms us that a
@piyushpathak1186
@piyushpathak1186 4 жыл бұрын
It doesn't need to check if a
@shuvshaw9594
@shuvshaw9594 5 жыл бұрын
very helpful
@parthtrehan1758
@parthtrehan1758 8 жыл бұрын
Hello sir.... i wanted to ask that if the first condition in the if statement... ie. a>b is true but the a>c is not.. then the statement won't work.. but how does it confirms us that a
@yashinsha
@yashinsha 8 жыл бұрын
you are absolutely right sir has made a logical error there
@pawan208402
@pawan208402 7 жыл бұрын
instead use ||(or) simple
@manishjain7021
@manishjain7021 7 жыл бұрын
no it's totally correct...you are just finding maximum of three numbers..if first statement is false then definitely either b or c is greater so only you are comparing b and c..hope you understand.
@manishjain7021
@manishjain7021 7 жыл бұрын
no don't use OR operator it will be a big mistake..you are just finding maximum of three numbers...try inserting numbers and approaching question..
@mohammedviso2269
@mohammedviso2269 9 жыл бұрын
thank for this...............
@debashishmoharana2761
@debashishmoharana2761 5 жыл бұрын
Besides learning JAVA i learnt another thing that Mac is much faster than Windows. There is no execution time in Mac
@khanmeher3234
@khanmeher3234 9 жыл бұрын
Sir ,if i want to add the component at runtime then how ,i can achieve it in java
@screwedidiot937
@screwedidiot937 8 жыл бұрын
import java.util.Scanner; class GetInputFromUser { public static void main(String args[]) { int a; float b; String s; Scanner in = new Scanner(System.in); System.out.println("Enter a string"); s = in.nextLine(); System.out.println("You entered string "+s); System.out.println("Enter an integer"); a = in.nextInt(); System.out.println("You entered integer "+a); System.out.println("Enter a float"); b = in.nextFloat(); System.out.println("You entered float "+b); } }
@Raj_Patel21
@Raj_Patel21 9 жыл бұрын
Can we make a prog. In which we giv any number at output and then it tell us even or odd....??
@ezazq9876
@ezazq9876 7 жыл бұрын
use this code.// I wrote it to check to find out biggest number, you can modify to check Even or Odd. public class Add { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Put value of A"); int a = scan.nextInt(); System.out.println("Put value of B"); int b = scan.nextInt(); System.out.println("Put value of C"); int c = scan.nextInt(); if(a>b && a>c){System.out.println("The biggest of all three is ,A,");} else if(b>c && b>a){System.out.println("The biggest of all three is ,B,");} else if(c>b && c>a){System.out.println("The biggest of all three is ,B,");} } }
@ashishmeshram110
@ashishmeshram110 7 жыл бұрын
class MyClass { public static void main(String args[]) { int x = 0; if (x == 0) System.out.println("hi"); else System.out.println("how are u?"); System.out.println("hello"); } } the output of the above code is = hihello I don't understand why?
@pujekar
@pujekar 7 жыл бұрын
Since there is no flower bracket after if and else, for example, if the statement is True(x==0), then the first line of the else will not b executed , where as the remaining lines will be and if the statement is False(x==1) then all the lines in the else block will be executed.
@prathameshdeshmukh6131
@prathameshdeshmukh6131 7 жыл бұрын
It would be nice of you if you can explain me the same
@alexop5919
@alexop5919 3 жыл бұрын
Great lessons but your PC is a potato
@pankajmelkani593
@pankajmelkani593 6 жыл бұрын
sir your voice is not much audible in this video
@anlar1998
@anlar1998 8 жыл бұрын
Your accent killing me
5.3 How to use Ternary Operator in Java Tutorial
5:57
Telusko
Рет қаралды 176 М.
#12 If else in Java
12:59
Telusko
Рет қаралды 164 М.
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 8 МЛН
How to whistle ?? 😱😱
00:31
Tibo InShape
Рет қаралды 17 МЛН
Cool Parenting Gadget Against Mosquitos! 🦟👶 #gen
00:21
TheSoul Music Family
Рет қаралды 32 МЛН
My Daughter's Dumplings Are Filled With Coins #funny #cute #comedy
00:18
Funny daughter's daily life
Рет қаралды 36 МЛН
Learn Java in 14 Minutes (seriously)
14:00
Alex Lee
Рет қаралды 4,8 МЛН
C in 100 Seconds
2:25
Fireship
Рет қаралды 3,1 МЛН
5.14 Palindrome or not Java Tutorial
9:33
Telusko
Рет қаралды 233 М.
Tell Me About Yourself - A Good Answer to This Interview Question
7:06
Linda Raynier
Рет қаралды 24 МЛН
1.5 Simple Example Code in Java | Java Tutorial
9:25
Telusko
Рет қаралды 438 М.
Confusing English Words: NO, KNOW, NOW
9:06
Learn English with Gill · engVid
Рет қаралды 10 М.
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,2 МЛН
Solve Any Pattern Question With This Trick!
57:20
Kunal Kushwaha
Рет қаралды 2,4 МЛН
How to Answer: Tell Me About Yourself.
8:06
Big Interview
Рет қаралды 6 МЛН
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 8 МЛН