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.
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
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
Thank u sirrr...😭😭😭🥺🥺🥺
I needed this...the perfect explanation 👍
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.");
}
}
Good job!
Thank you veryyyyyyyyyy much ❤️😭
Can you do this with variables?
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.
I think the the value 101(that is the incremented value of 100) will be assigned to variable num2 and num3 will remain 100
Sir I have doubt on age++ + ++age how it will b sir plz explain me
Age is 12 after incrementing the age was 13 and after post increment age was 14.12+14 = 26
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
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
Awesome
Didn't understand 8+6 in last how come -- 6
how the age becomes 11?? I didn't understand that. Clarify that
nice
Thank you. Do not forget to visit www.smartherd.com/
Not so good explanation
Explain hindi