nice one sir, already know this concept but learned few more, thanks 🙂🙂
@deivasigamanimurugan48927 жыл бұрын
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.
@kunalalshi77709 жыл бұрын
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.
@adharsh2006 жыл бұрын
Hi Naveen, the second condition you have entered is incorrect. That should be b>a && b>c.
@IndieTechHindi4 жыл бұрын
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.
@jithendrabaswareddy21138 жыл бұрын
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 ??
@screwedidiot9378 жыл бұрын
You are right. Even i was confused.
@prathameshdeshmukh61317 жыл бұрын
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
@piyushpathak11864 жыл бұрын
It doesn't need to check if a
@shuvshaw95945 жыл бұрын
very helpful
@parthtrehan17588 жыл бұрын
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
@yashinsha8 жыл бұрын
you are absolutely right sir has made a logical error there
@pawan2084027 жыл бұрын
instead use ||(or) simple
@manishjain70217 жыл бұрын
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.
@manishjain70217 жыл бұрын
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..
@mohammedviso22699 жыл бұрын
thank for this...............
@debashishmoharana27615 жыл бұрын
Besides learning JAVA i learnt another thing that Mac is much faster than Windows. There is no execution time in Mac
@khanmeher32349 жыл бұрын
Sir ,if i want to add the component at runtime then how ,i can achieve it in java
@screwedidiot9378 жыл бұрын
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_Patel219 жыл бұрын
Can we make a prog. In which we giv any number at output and then it tell us even or odd....??
@ezazq98767 жыл бұрын
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,");} } }
@ashishmeshram1107 жыл бұрын
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?
@pujekar7 жыл бұрын
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.
@prathameshdeshmukh61317 жыл бұрын
It would be nice of you if you can explain me the same