Difference between prefix and postfix forms of the
++operator?

Answer Posted / uday ray

They behave differently when they are used in expressions on
the right hand side of an assignment statement. A prefix
operator first adds 1 to the operand and the result is
assigned to the variable on left. On the other hand, a post
fix operator first assign the value to the variable on left
and then increments the operands.

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is stringwriter?

530


What are the various access specifiers for java classes?

537


Give differences between Quicksort & Mergesort. When should these sorts be used and what is their running time?

567


What is a local block?

628


How do you use parseint in java?

506






What is yield () in java?

476


Can a constructor have different name than a class name in java?

583


What are the wrapped, classes?

587


What are inbuilt functions?

559


How to check if a list is sorted in java?

580


What is difference between path and classpath variables?

556


What is the difference between a method and a function in alice?

567


What do you mean Abstraction in java?

600


Explain about method local inner classes or local inner classes in java?

561


What are basic keywords?

549