File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes what will be the output? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "what will be the output?" Watch "what will be the output?" New topic
Author

what will be the output?

Arijit Daripa
Ranch Hand

Joined: Aug 09, 2008
Posts: 142
Without running the code tell me what will the output of the following snippet be.


SCJP 5
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18840
    
  40

http://faq.javaranch.com/java/PostIncrementOperatorAndAssignment


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Jiang zhixiao
Greenhorn

Joined: Jul 01, 2008
Posts: 13
Originally posted by ARIJIT DARIPA:
Without running the code tell me what will the output of the following snippet be.

10;
you shoud know the different between i ++ and ++i;
i++,means give a value to i;then add 1;
++i,means add one,then give the value to i;
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what will be the output?