Details about "Pre Fix & Post Fix"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shammika
    New Member
    • Oct 2007
    • 2

    #1

    Details about "Pre Fix & Post Fix"

    Hi, can you give more details about the Pre fix & Post fix of java with examples.
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by shammika
    Hi, can you give more details about the Pre fix & Post fix of java with examples.
    I'll move your question over to the Java Forum section where it belongs; this
    Articles section is for informative articles only.

    kind regards,

    Jos

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      If you mean pre- and postfix operators, what does your Java book mention about them?
      Anything you don't understand? Please elaborate.

      kind regards,

      Jos

      Comment

      • Ganon11
        Recognized Expert Specialist
        • Oct 2006
        • 3651

        #4
        You probably recognize this type of expression:

        Code:
        a + b * c - (d / g)
        This is called infix - the operators are 'in' the expression, where they belong.

        Postfix means the operators come after the operands they are meant to work on. The above example in postfix is:

        Code:
        b c * a + d g / -
        Prefix means the operator comes before the operands it is meant to work on. The above example in prefix is:

        Code:
        - + * b c a / d g

        Comment

        Working...