Logical Operators in Java

Поделиться
HTML-код
  • Опубликовано: 6 ноя 2024

Комментарии • 24

  • @aminkhan7179
    @aminkhan7179 4 года назад +8

    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.

  • @ysatyasai9302
    @ysatyasai9302 3 года назад +1

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

  • @broshesbusy3727
    @broshesbusy3727 2 года назад

    What to type first before that?

  • @rajputakeshsingh4523
    @rajputakeshsingh4523 3 года назад +1

    Thank you

  • @dllm3tommy741
    @dllm3tommy741 Год назад

    Thanks for the Video

  • @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 9 месяцев назад

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

  • @mheditshamza5702
    @mheditshamza5702 Год назад +1

    Wonderful 👍

  • @alpineswiftai
    @alpineswiftai 3 года назад

    great explanation.

  • @rt7687
    @rt7687 Год назад

    very helpfull

  • @gyangaha109
    @gyangaha109 4 года назад

    Thanks. Please keep up the good work.

  • @shahidaibrahim2917
    @shahidaibrahim2917 3 года назад +1

    great!!

  • @jradlr
    @jradlr Год назад

    done

  • @theworld3840
    @theworld3840 2 года назад

    Great 👍😃

  • @AllAboutCode
    @AllAboutCode 2 года назад +1

    Troo and trooo will give me troo

  • @shantanutekale6199
    @shantanutekale6199 3 года назад

    best

  • @Porcupinebygoldiee526
    @Porcupinebygoldiee526 3 года назад +1

  • @priyamsaha
    @priyamsaha 4 года назад +2

    Russian?

    • @60_9
      @60_9 4 года назад +3

      I think Arab

    • @paia6447
      @paia6447 2 года назад +1

      Indian

  • @rajnandanipuri2895
    @rajnandanipuri2895 4 месяца назад

    Truuuuu😂

  • @leiferickson9666
    @leiferickson9666 Год назад

    No thanks, dude.....