Increment and Decrement Operators in Java

preview_player
Показать описание
Java Programming: Increment and Decrement Operators in Java Programming
Topics Discussed:
1. The increment operator in Java.
2. The decrement operator in Java.

Music:
Axol x Alex Skrindo - You [NCS Release]

#JavaByNeso #JavaProgramming #IncrementOperator #DecrementOperator
Рекомендации по теме
Комментарии
Автор

int x = 10;

System.out.println( - - x ) ====> first decrement, then print ==> 9
System.out.println( x - - ) ====> first print, then decrement ==> 10

System.out.println( + + x ) ====> first add, then print ==> 11
System.out.println( x + + ) ====> first print, then add ==> 10

hakancemgercek
Автор

For those who are confused between first and last examples...
last example of post and pre decrement is perfect and a correction
In first example is at post increment(i++) the value printed is old value. (i.e output: 4 ) NOT 5
and in pre increment(++i) value printed is new value.(output:5)

sreehari
Автор

You're more helpful than my professor

sunoo_sun
Автор

I liked nesco due to their editing and the way they communicated with us and the PPT was also really sophisticated and reliable for my quarterly examination

sreelathachelimill
Автор

I don't understand why (i) is changing while we are only modifying (j) ??? shouldn't (i) remain the same?

Ahmedtalib
Автор

Thank u very clear information sir keep doing

ravalimanchala
Автор

great effort, videos are awesome. Keep doing.

svanaja
Автор

It was a bit confuse for me :D, but thank you anyway for all the great lessons.

Anakanueva
Автор

public class Main{
public static void main {
System.out.println("Thank you Ali Badran Sir!!, means a lot!!);
}
}

riteshmadishetty
Автор

what is the name of the instructor? really good prof

americanenglish
Автор

In the final example he said decrement was 4 and 3 but then he said the first was 3? Is it 3 or 4 for the first example.

nev
Автор

Little bit confusion about decriment why in first example we don't get 3 ? Anyone can tell me that

samtechnicalguru
Автор

what operator we can use if we want to increase or decrease the value by more than 1 ?

ayushsingh
Автор

in ++i the value got increased but in --i prints the same value, confused ?

manjuvishwakarma
Автор

brader, i think you wrong in decrement while i-- is 4

klid