Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the value of 'money'!!!

 
Karthika Vanappandian
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..?
 
Everybody's invited. Except this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!