what is the difference between prefix and postfix in java?
Answers
Answered by
2
The prefix form first performs the increment operation and then returns the value of the increment operation. The postfix form first returns the current value of the expression and then performs the increment operation on that value. For example:
int count=1;
System.out.println(++count);
displays 2. And
int count=1;
System.out.println(count++);
displays 1.
int count=1;
System.out.println(++count);
displays 2. And
int count=1;
System.out.println(count++);
displays 1.
Abhishek501:
thank
Answered by
0
Answer:
tum bhago ma kyu bhagu koi pasena nhi chuta hai mera aya bada darpok chuha kahi ka. chl nikl aba
Similar questions