This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes post fix Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "post fix" Watch "post fix" New topic

post fix

devarshi pandya

Joined: May 25, 2007
Posts: 3

public class xxx{
public static void main|(String args[]){
int i=10;
O/P is 10 why???
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15036

i = i++ is not what you think it is. See this: JavaRanch FAQ: Post Increment Operator And Assignment.

(Please don't post a question more than once, and choose a forum carefully. This is a beginner's question, not an Advanced Java question).

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: post fix
It's not a secret anymore!