Meaningless Drivel is fun!*
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What is the value of Watch "What is the value of New topic

What is the value of 'money'!!!

Karthika Vanappandian

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

Joined: Sep 28, 2004
Posts: 18500

Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
It is sorta covered in the JavaRanch Style Guide.
subject: What is the value of 'money'!!!
Similar Threads
doubt pg 340 of k&b
Converting string to int
Contructor and method overridening
handeling radio buttons
Pls HELP-- convert string array to int array