• Post Reply Bookmark Topic Watch Topic
  • New Topic

Explanation required  RSS feed

 
Alfred Nobel
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


The value of 'i' after executing the above code is 0.

Can any one give an explanation for this. Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Manojlal M",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See JavaRanch FAQ: Post Increment Operator And Assignment.
 
Minal Silimkar-Urankar
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Manoj lal

what is syso(i)
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Manojlal M:




int i=0;
i=i++;//this is a post increment
search about preincrement,postincrement in google
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Manoj lal please UseAMeaningfulSubjectLine.
What can someone else make out of "Explanation required".

Also take some time to read the ask good questions link below.
 
Juan Manuel Alberto de los Santos
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

[ August 04, 2008: Message edited by: Juan Manuel Alberto de los Santos ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!