Logical Operators in Java

Поділитися
Вставка
  • Опубліковано 11 гру 2024

КОМЕНТАРІ • 24

  • @aminkhan7179
    @aminkhan7179 4 роки тому +9

    bro do this with programs it helps more than giving only examples

  • @Renso2010
    @Renso2010 3 роки тому +5

    I want to complement this fantastic video with another operator, this operator is operatior xor the signal is ^, for example imagine you have a car, this card have two possibilities automatic or hydraulic but not both.
    boolean isAutomatic = true;
    boolena isMechanic = false;
    if(isAutomatic == true ^ isMechanic == true) -> true result.
    Why... because one card have two possibilities mechanic or automatic but not both.
    this is the principal reason to use the operator "^", is posible to combine operator not, and and or to simulate this result, but the operator "^" simplify the code.
    Regards from Perú.
    Continue share your knowlegde my friend.

  • @dllm3tommy741
    @dllm3tommy741 Рік тому

    Thanks for the Video

  • @mheditshamza5702
    @mheditshamza5702 2 роки тому +1

    Wonderful 👍

  • @srinivasan4999
    @srinivasan4999 Рік тому +1

    sir from your idea in 5:20 i'm build this code
    .
    .
    import java.util.Scanner;
    public class SuggestBot {
    public static void main(String[] args) {
    System.out.println("Enter true if its raining:");
    System.out.println("Enter true if its cold:");
    Scanner s1 = new Scanner(System.in);
    boolean b1 = s1.nextBoolean();
    Scanner s2 = new Scanner(System.in);
    boolean b2 = s2.nextBoolean();
    if (b1 && b2){
    System.out.println("stay indoor");
    } else if (b1 || b2) {
    System.out.println("wear a raincoat/jacket");
    } else {
    System.out.println("you are good to go");
    }
    }
    }

    • @suswithcherry9252
      @suswithcherry9252 11 місяців тому

      It is not necessary to use scanner class multiple times if you want to take multiple inputs.

  • @rajputakeshsingh4523
    @rajputakeshsingh4523 3 роки тому +1

    Thank you

  • @ysatyasai9302
    @ysatyasai9302 3 роки тому +1

    Good explanation. But I want bitwise and ,or and xor operators in java

  • @gyangaha109
    @gyangaha109 4 роки тому

    Thanks. Please keep up the good work.

  • @alpineswiftai
    @alpineswiftai 3 роки тому

    great explanation.

  • @broshesbusy3727
    @broshesbusy3727 2 роки тому

    What to type first before that?

  • @rt7687
    @rt7687 Рік тому

    very helpfull

  • @theworld3840
    @theworld3840 2 роки тому

    Great 👍😃

  • @shahidaibrahim2917
    @shahidaibrahim2917 3 роки тому +1

    great!!

  • @AllAboutCode
    @AllAboutCode 2 роки тому +1

    Troo and trooo will give me troo

  • @jradlr
    @jradlr Рік тому

    done

  • @shantanutekale6199
    @shantanutekale6199 3 роки тому

    best

  • @Porcupinebygoldiee526
    @Porcupinebygoldiee526 3 роки тому +1

  • @priyamsaha
    @priyamsaha 4 роки тому +2

    Russian?

    • @60_9
      @60_9 4 роки тому +3

      I think Arab

    • @paia6447
      @paia6447 3 роки тому +1

      Indian

  • @rajnandanipuri2895
    @rajnandanipuri2895 5 місяців тому

    Truuuuu😂

  • @leiferickson9666
    @leiferickson9666 Рік тому

    No thanks, dude.....