aspose file tools*
The moose likes Beginning Java and the fly likes What is the value of 'money'!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What is the value of Watch "What is the value of New topic
Author

What is the value of 'money'!!!

Karthika Vanappandian
Greenhorn

Joined: Jun 16, 2007
Posts: 3
Hi All,
Consider the code snippet..
---------------------------------------------------
int money=0;
for(int i = 0;i<100;i++)
{
money = money++;
}
System.out.println("The value of money is "+money);
---------------------------------------------------
Can someone tell me the value of money in the above code by ellaborating the loop execution..?
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18978
    
  40

http://faq.javaranch.com/view?PostIncrementOperatorAndAssignment


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the value of 'money'!!!