File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes what is the diffrence b/W i and i++ and explain inner loops with conditions 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 diffrence b/W i and i++ and explain inner loops with conditions" Watch "what is the diffrence b/W i and i++ and explain inner loops with conditions" New topic
Author

what is the diffrence b/W i and i++ and explain inner loops with conditions

giribabu rosi
Greenhorn

Joined: Apr 14, 2005
Posts: 17

//Edited to add CODE tags.
[ May 12, 2005: Message edited by: Joel McNary ]
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1824

This had better be some sort of certification preparation question, because I will personally hunt down aanybody who uses code like this in production.

when you say

you are assigning h the value of i; now h == i

when you say

you are assigning h the value of i and then incrementing the value of i; now h == i-1;

when you say

you are incrementing the value of i and then assigning h the value of i; now h == i

As to your second question, I'm afraid that I don't understand the question.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what is the diffrence b/W i and i++ and explain inner loops with conditions