Java Increment and Decrement Unary Operators. Java Tutorial for Beginners #3.5

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

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

  • @anushkaranjan259
    @anushkaranjan259 4 года назад +5

    Thank u sirrr...😭😭😭🥺🥺🥺
    I needed this...the perfect explanation 👍

  • @AmanSharma-kq4rb
    @AmanSharma-kq4rb 5 лет назад +7

    public class dudeYouRock {
    public static void main(String[] args){

    System.out.println("I'm a first year Computer Science student. All I wanna say is that you teach way better than my CS professor lol.");
    }
    }

  • @ratmirsusanin5496
    @ratmirsusanin5496 5 лет назад +2

    Good job!

  • @deepika2644
    @deepika2644 4 года назад +1

    Thank you veryyyyyyyyyy much ❤️😭

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

    Can you do this with variables?

  • @pratapkumarreddymallidi4509
    @pratapkumarreddymallidi4509 4 года назад +1

    Hi bro , Postfix Increment and Decrement operator what is the use of execution when the value doesn't change . I didn't understand I had tried executing it is showing the previous value only.
    public class Unaryoperator {
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    int num1 = 100;
    int num2 = 100;
    int num3 = num2++ ;
    System.out.println("output is " +num3);
    int num4 = num3;
    System.out.println("output is " +num4);
    Output for both num3 and num4 is same = 100. I thought it will assign the incremented value to the next num4 but it's not. Can you please clarify.

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

      I think the the value 101(that is the incremented value of 100) will be assigned to variable num2 and num3 will remain 100

  • @shabanarahamath8708
    @shabanarahamath8708 5 лет назад +1

    Sir I have doubt on age++ + ++age how it will b sir plz explain me

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

      Age is 12 after incrementing the age was 13 and after post increment age was 14.12+14 = 26

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

      It's simple ...when ever we perform some operation the store value changes ..
      So stored value of age - 10
      In postfix we first perform the operation with value age has ...i.e 10 after this we update the value i.e age -11 now this value will used in every other operations ..
      Similarly in prefix we first update the value
      Age was 10 suppose ..it get updated to 11 ..now 11 will be used everywhere

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

    Because of that typing translator going on at the bottom left we cannot see wht u have typed on the intellige screen. This is one problem I see on many videos now a days

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

    Awesome

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

    Didn't understand 8+6 in last how come -- 6

  • @agent-147
    @agent-147 3 года назад

    how the age becomes 11?? I didn't understand that. Clarify that

  • @prabhasingh4017
    @prabhasingh4017 6 лет назад

    nice

    • @smartherd
      @smartherd  6 лет назад

      Thank you. Do not forget to visit www.smartherd.com/

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

    Not so good explanation

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

    Explain hindi